in reply to Re^4: ActivePerl exit codes
in thread ActivePerl exit codes

Can't you redirect STDERR to a log file? ie call the perl script in the batch file with:
perl script.pl 2>>error.log
That should give you something to go on.

I know next to nothing about dos/windows, so this might not work. try it. otherwise put

BEGIN { open STDERR,">>","error.log" or die "Can't open error.log: $!"; }
at the top of the script.