This issue has been raised here numerous times. Everyone is giving you good advice. You might want to look at the code behind Win32::Die as well. There's also a little known module called win. It's still in beta, but it looks promising.
Comment on Re: Small Problem with running Perl Scripts in Windows