my @testLists; foreach my $list (@testLists) { my $pid = fork; if ($pid == 0) { $status += regressions($opts, $list); exit; } push(@pids, $pid); } foreach my $pid (@pids) { waitpid($pid, 0); }