Is the code under Windows using Win32::Process::Create() and ->GetProcessID() then later Win32::Process::KillProcess() to kill the process?
It works differently to Unix.
See this code example for cross-platform process spawn/kill
Re: Perl Background processes in Windows