$^E=0; Win32::Process::KillProcess($pid, 111) or warn $^E; Win32::Process::Wait(INFINITE);