Redirect stderr to stdout inside perl script 
Author Message
 Redirect stderr to stdout inside perl script

Hi,

reading perlfaq8, question "How can I capture STDERR from an external
command?", it is not possible to "simply open STDERR to be a dup of
STDOUT in your Perl program and avoid calling the shell to do the
redirection". Is there another way to capture warning messages to
stdout?

Thx
--
Peter De Gersem



Sun, 06 Aug 2000 03:00:00 GMT  
 Redirect stderr to stdout inside perl script

I have found that the use of the -w option with the
use strict;
use diagnostics;

Works great!  Unless your on Windoze, then 'use diagnostics;' doesn't
really ..

HTH,
Bill

Quote:

> Hi,

> reading perlfaq8, question "How can I capture STDERR from an external
> command?", it is not possible to "simply open STDERR to be a dup of
> STDOUT in your Perl program and avoid calling the shell to do the
> redirection". Is there another way to capture warning messages to
> stdout?

> Thx



Sun, 06 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Redirect STDOUT from a Unix script to a perl program and then redirect back to script

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

3. HELP - with redirect of STDERR and STDOUT

4. redirect STDERR to STDOUT ?????

5. redirecting stderr and stdout

6. writing to terminal even with STDOUT and STDERR redirected

7. assigning STDERR whild redirecting STDOUT to a file

8. Problem with redirecting STDOUT and STDERR

9. How to redirect STDOUT,STDERR and keep the message order

10. Redirecting STDERR to STDOUT (on NT)

11. HELP - with redirect of STDERR and STDOUT

12. need to redirect STDOUT and STDERR

 

 
Powered by phpBB® Forum Software