Steve Remme wrote: > Is it possible to send the output from the 'die' and/or 'warn' commands > to a file instead of stderr? Ideally, I would like this behavior to be > configurable based on the existence of an environment variable. > > For example, if the environment variable MY_ERR_LOG is set to "err.txt" > then err.txt would contain any die/warn messages. Otherwise, any > die/warn messges would go to the normal stderr. > > I apologize if there is a "simple" answer. I just don't have the time to > play with this, and I didn't find anything that looked useful on google.
Just open/redirect STDERR to the file (probably want it in a BEGIN block). _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs