RE: Changing STDERR

2002-02-19 Thread Laycock, Angus
Job sorted, it works!!! Thanks you all for your help. Gus -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 15:20 To: '[EMAIL PROTECTED]' Subject: Re: Changing STDERR From: "Laycock, Angus" <[EMAIL PR

Re: Changing STDERR

2002-02-19 Thread Jenda Krynicky
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 ope

Re: Changing STDERR

2002-02-19 Thread Jeff 'japhy' Pinyan
On Feb 19, Laycock, Angus said: >Can someone tell me how to change STDERR to output to a file then change it >back to its original output. Look at the documentation for open(). It shows you how to temporarily change a filehandle. Here are the first four lines of code: open(OLDOUT, ">&STDOUT

Changing STDERR

2002-02-19 Thread Laycock, Angus
Please, Can someone tell me how to change STDERR to output to a file then change it back to its original output. my $oldout = select STDERR; print STDERR "test1\n"; open STDERR, ">test.txt" or die "Can't open file STDERR [OUTPUT]"; print STDERR "test2\n";# goes to file select $ol