in reply to Perl exit code is not always bubbling up

Get rid of the batch. If you do not want to change the perl script itself, create another in which you do whatever you used to do in the batch, set the @ARGV and do "the_script.pl";