in reply to Capture PID from child process on Windows.

Your command probably required a shell to execute, so you have the PID of the shell, the true child. Use exec PROGRAM LIST instead of exec LIST. In other words, use nothing but a (fully qualified???) file name in $prog.

By the way, fork is not particulary strong in Windows since the non-native system call is emulated using threads. $pid = system(-1, ...) (undocumented), Win32::Process, IPC::Open2, IPC::Open3 and IPC::Run are more appropriate than fork+exec. In this case, I'd use Win32::Process unless portability is desired.