in reply to Win32::Process - need help from an expert!

As you can see, Win32::Process::Create does not wait for the child to execute.

# parent.pl use strict; use warnings; use Win32::Process qw( NORMAL_PRIORITY_CLASS INFINITE ); { Win32::Process::Create( my $child, $^X, "perl child.pl", 0, NORMAL_PRIORITY_CLASS, "." ) or die("Unable to launch child: $^E\n"); print("Lanched child.\n"); while (!$child->Wait(50)) { print("Child still executing...\n"); } $child->GetExitCode(my $child_exit_code); print("Child exited with code $child_exit_code\n"); }
# child.pl use Time::HiRes qw( sleep ); print "Doing something\n"; sleep(0.100); print "Doing something\n"; sleep(0.100); print "Doing something\n"; sleep(0.100); print "done.\n";
>perl parent.pl Lanched child. Child still executing... Doing something Child still executing... Doing something Child still executing... Child still executing... Doing something Child still executing... Child still executing... done. Child exited with code 0

Hum, Win32::Process has a very un-perl-like interface. (It returns values through arguments.) And you can't distinguish whether Wait failed or simply timed out.