I agree with that however it appears that Zaxo wants all his warnings and errors to go to a specific file. Warn just sends it to STDERR. I do not believe that opening and closing STDERR will cause any real problems though in his situation (redirection of standard error). However, the Camel book says that standard error is, "The default output stream for nasty remarks that don't belong in standard output. Represented within a Perl program by the filehandle STDERR. You can use this stream explicitly, but the die and warn built-ins write to your standard error stream automatically."
However it also says, "Although filehandles STDIN, STDOUT, and STDERR start out with file descriptors of 0,1, and 2 (the Unix standard convention), even they can change if you start closing and opening them with wild abandon."
I usually just pipe errors warnings to my log files using command line notation, ie: /usr/bin/perl script.pl 2>>/path/logfile | [reply] |