# 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"); }