use windows events to coordinate the two processes; you can even pause execution and you don't even need the PID to kill it.
just signal it and let it die....
Take a look at :
Re: Kill a perl script execution in windows and
Re^3: Kill a perl script execution in windows