in reply to Capture PID from child process on Windows.
Since it's windows, perhaps you should look at Win32::Process.