my $pid = fork(); unless (defined $pid) { die "Could not fork $!"; } elsif (!$pid) [ # child exit; } else { # parent, inkrementiere $k1 etc. }