RE: STDERR

2002-02-04 Thread Scott L Ryan
Once you open a file... open(INPUT, "+>file"); *STDERR = *INPUT; should do it I think -Original Message- From: Russell Boyd [mailto:[EMAIL PROTECTED]] Sent: 04 February 2002 22:56 To: [EMAIL PROTECTED] Subject: STDERR How do you put STDERR to a file for the duration of the perl program

Re: STDERR to a file

2002-02-04 Thread Brett W. McCoy
On Mon, 4 Feb 2002, Pfeiffer, Richard wrote: > Trying to get STDERR to not print to the screen but rather to a file, or > better yet, an array. > Easy to do in UNIX (because I know how, of course): > vcs -v >file.out 2>&1 > > but how would I do it in Perl? I've tried a few variations of: p

RE: STDERR to a file

2002-02-04 Thread Nikola Janceski
# To capture the error use: open(OLDERR, ">&STDERR") or die $!; # backup filehandle open(STDERR, ">standard_errors") or die $!; # errors go here now ## do your stuff here open(STDERR, ">&OLDERR") or die $!; # restore filehandle -Original Message- From: Pfeiffer, Richard [mailto:[EMAI

Re: STDERR question.

2001-10-30 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Peter Lemus) wrote: > I would like to send all errors and messages to a > file, but also to the screen when the script execute. you need IO::Tee http://search.cpan.org/search?dist=IO-Tee -- brian d foy <[EMAIL PROTECTED]> - Perl services for

Re: STDERR

2001-10-27 Thread Maxim Berlin
Hello Walter, Saturday, October 27, 2001, Walter Grace <[EMAIL PROTECTED]> wrote: WG> I have a script that is called from the web that has 'warn' statements WG> embedded. WG> Regarding the 'warn' statements: Where does STDERR output get sent by default? WG> How can I redirect it to a specif

Re: STDERR Question

2001-06-19 Thread n6tadam
Hi, I think this is possible while (<>) { open(STDERR > /file) close(STDERR) } I think thats right (I'm rather new to perl). HTH, Thomas Adam - Original Message - From: Conrad, Bill (ThomasTech) <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 19, 2001 12:41 PM Subjec

Re: STDERR on Win32

2001-05-15 Thread Paul
RE: Collecting error output from child processes on Win32 == I think this will work: open STDERR,">$logfile" or die $!; That should close STDERR and reopen it to the specified output, which child processes will then inherit. Another tr