in reply to How to kill an external program
The following code works for me. It assumes the process returns before it's done (I think all Win32 GUI programs do that, but command line ones don't - which sort are you using?).
my $PID = open my($Notepad), "|notepad.exe"; sleep 1; print "DIE!\n"; kill 9, $PID;
Perl Monks do it more than one way.
In Section
Seekers of Perl Wisdom