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 ", $!);

Replies are listed 'Best First'.
Re: Re: Mysterious script crash in win2k and ActivePerl
by jhanna (Scribe) on Dec 13, 2002 at 16:48 UTC
    I'm not redirecting STDERR yet. I'll add that, but I think it's a Windows level error, so I doubt I'll see anything there. Still, it's worth a try.