# 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:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 5:13 PM
To: '[EMAIL PROTECTED]'
Subject: STDERR to a file



Hello,

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:   print
<STDERR> ...   but seem 
to keep hitting dead ends.

Thanks!


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to