From: "Laycock, Angus" <[EMAIL PROTECTED]> > Can someone tell me how to change STDERR to output to a file then > change it back to its original output.
#!perl -w print STDERR "First msg\n"; use vars qw(*ORIGSTDERR); # to make -w happy open ORIGSTDERR, '>&STDERR'; open STDERR, '>c:\temp\zkERR.txt'; print STDERR "Second msg\n"; close STDERR; open STDERR, '>&ORIGSTDERR'; print STDERR "Third msg\n"; __END__ HTH, Jenda =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== There is a reason for living. There must be. I've seen it somewhere. It's just that in the mess on my table ... and in my brain. I can't find it. --- me -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]