in reply to Re: Watching Perl die() under Win32
in thread Watching Perl die() under Win32
Doesn't DOS shells (I use that term loosely) offer an errorlevel check?
So, you could pause only if the process returns a non-zero exist status:
perl.exe -w %1
if errorlevel 1 pause