Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

RE: Getting STDERR to write to STDOUT?

by autark (Friar)
on Jul 10, 2000 at 04:14 UTC ( [id://21736]=note: print w/replies, xml ) Need Help??


in reply to Getting STDERR to write to STDOUT?

I assume you want to catch the STDERR of a program, then you can do this:
open(HANDLE, "my_prg 2>&1 |") || die "error: $!\n";
or
$output = `my_prg 2>&1`;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://21736]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-24 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found