my $max_procs = 60; my $pm = new Parallel::ForkManager($max_procs); foreach my $child ( 0 .. $#cmds ) { my $pid = $pm->start($cmds[$child]) and next; # This is where I need to get the stdout and stderr. # cmds can be external command which can be windowsexecutable.exe $args (for example perl.exe script.pl $arg1 $arg2) system("cmds"); my $Result = $? >> 8; $pm->finish($Result); # pass an exit code to finish } $pm->wait_all_children;