... my $j=Win32::Job->new; $j->spawn('perl.exe', "perl.exe myprog.pl", { new_console=>0, new_group=>1, stderr=> $out, stdout=> $out }) unlink 'killfile.txt'; $j->watch(sub { -e 'killfile.txt' ? 1 : 0 }, 3); print "go on\n"; ...