Redirecting STDERR to STDOUT 
Author Message
 Redirecting STDERR to STDOUT


Quote:

>I have a need to redirect STDERR to STDOUT in a perl program.

    open(STDERR, ">& STDOUT") or die "$0: can't dup stdout: $!\n";

Quote:
>Any hints on how to do this.

RTFM: it's in the perlfunc man page under the description of the
open function.

Tim.
--
Tim Goodwin   | "After all, what did Brunel, Watt, Boulton and
Unipalm PIPEX | Telford do that was complex?  I could have built
Cambridge, UK | the Great Western Railway on my own." -- Ian Batten



Sat, 16 May 1998 03:00:00 GMT  
 Redirecting STDERR to STDOUT

Quote:
>I have a need to redirect STDERR to STDOUT in a perl program.
>Any hints on how to do this.

How about open(STDERR, ">&STDOUT").

Hope that helps.



Sat, 16 May 1998 03:00:00 GMT  
 Redirecting STDERR to STDOUT
I have a need to redirect STDERR to STDOUT in a perl program.
Any hints on how to do this.

Thanks in advance.
--

Derald H McMillan III
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Systems Engineer                         Webmaster
SolTech Systems Corporation              Pi Kappa Phi Fraternity
(803)556-2500                            

http://www.soltech.com                   http://www.pikapp.org

                http://www.soltech.com/~dmcmilla
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sat, 16 May 1998 03:00:00 GMT  
 Redirecting STDERR to STDOUT

Quote:
>I have a need to redirect STDERR to STDOUT in a perl program.
>Any hints on how to do this.

under most circumstances ...
open (STDERR,">&STDOUT");
should work.

- derekb



Sun, 17 May 1998 03:00:00 GMT  
 Redirecting STDERR to STDOUT

: I have a need to redirect STDERR to STDOUT in a perl program.
: Any hints on how to do this.

FAQ #5:

5.15) How can I capture STDERR from an external command?

--
  Tad McClellan,      Logistics Specialist (IETMs and SGML guy)

  Interesting trivia: If you took all the sand in North Africa and spread
     it out... it would cover the Sahara desert.



Mon, 18 May 1998 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. redirect STDERR to STDOUT ?????

2. redirecting stderr and stdout

3. Redirect stderr to stdout w/ Perl under Unix?

4. Redirecting STDERR to STDOUT (on NT)

5. Redirecting STDERR to STDOUT?

6. redirecting stderr to stdout

7. redirect stderr and stdout to same file

8. redirect stderr and stdout to the same file

9. Redirect stderr to stdout inside perl script

10. Redirecting stderr to stdout

11. how to redirect stderr and stdout to same file

12. How do I redirect STDERR and STDOUT?

 

 
Powered by phpBB® Forum Software