@list=(srv1,srv2,srv3,srv3) for (1 .. $list_count) { print "Launching: Process $_$/"; defined(my $cpid = fork) or warn $! and next; $kid{$cpid} = undef, next if $cpid; my($server, $account, $path) = split /\t/,$list[$c]; $c++; my $proc = "$curdir"."program.exe $server".">$server.log"; exec $proc; exit 0; } delete $kid{wait()} while %kid; print "Done...$/";