my @pids; for (1..5) { push @pids, system(1, "DoThis.exe"); } waitpid($_, 0) for @pids;