AndyQ has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

from a (windows 7) command line, I can use the command:

perl.exe MyScript.pl > out.txt

This correctly dumps the output of my script to the file. If I now add an error into my script and run the same command I expect the file to contain the list of errors... Instead it is empty and the result is displayed on the command line!

What is happening and how can I force the errors to end up in the file? I need this so I can parse and display the errors later...

Thanks, Andy

Replies are listed 'Best First'.
Re: Redirecting Perl errors to a file
by toolic (Bishop) on Oct 04, 2011 at 17:18 UTC