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


in reply to Mysterious script crash in win2k and ActivePerl

Try sending all errors to a file instead of the console.

Something like should do the trick:

BEGIN { $|++; open(STDERR, ">>", "mysterious_errors.txt"); }

The >> is so that you append new errors to the file instead of overwriting it each time your program is run.

Also add error checking with something like:
do_something_with(@my_args) or die("Couldn't so_something_with ", $!);