http://www.perlmonks.org?node_id=985703


in reply to How to close command prompts opened with perl script after execution that script

I may have misunderstood something, but what if you use cmd /c instead of cmd /k?
Read perlipc if you need something more complex.
Sorry if my advice was wrong.