Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Sending STDERR to a filehandle

by ozone (Friar)
on Jun 10, 2003 at 08:27 UTC ( [id://264572]=note: print w/replies, xml ) Need Help??


in reply to Sending STDERR to a filehandle

change:
$pid = open(ERROR, "$cmd 2>&1 1>/dev/null |");
to
$pid = open(ERROR, "$cmd 1>/dev/null 2>&1 |");
I know that in Unix, putting them the wrong way around causes the same symptoms you are talking about.

Replies are listed 'Best First'.
Re: Re: Sending STDERR to a filehandle
by bobn (Chaplain) on Jun 10, 2003 at 17:08 UTC
    Actually, you're the one that has it backwards. Although most things hapopen letf-to-right, I've always found tht redirections happen right to left. Hence, you've arranged for STDOUT and STDERR both to go to /dev/null.

    --Bob Niederman, http://bob-n.com

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found