I have neither much experience with Perl on nor access to a Windows machine, so I can not give any specific advice, but I suggest you look into one of the
Win32:: modules to do the job you want, specifically
Win32::Process.
Makeshifts last the longest.