Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Capturing STDERR using IO::Handle

by ikegami (Patriarch)
on Nov 26, 2007 at 18:19 UTC ( [id://653055]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Capturing STDERR using IO::Handle
in thread Capturing STDERR using IO::Handle

Thanks. Yes, that would work. I didn't realize you were suggesting using temporary files. Seems like a lot of work that core function open3 (via IPC::Open3) already does for you (and it doesn't even require temporary files).

Replies are listed 'Best First'.
Re^5: Capturing STDERR using IO::Handle
by educated_foo (Vicar) on Nov 26, 2007 at 21:00 UTC
    Ah, right you are. But it's easy to screw yourself that way, since you're also blocking the child's STDIN and STDOUT.

      No harder than your method, since you can pass open file handles to open3 or open-style dup instructions.

      STDIN is moot. None of solutions pass anything to STDIN, since we weren't asked to pass anything to STDIN. You can close the child's STDIN if you want, or you can tie it to the parent's STDIN (by passing '<&STDIN') if you want.

      Similarly, you can do anything you want with the child's STDOUT. You can tie it to the parent's STDOUT ('>&STDOUT'), you can close it, you can redirect it to /dev/null, etc.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found