Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: capture STDOUT when some jerk opened STDOUT to /dev/tty

by clueless newbie (Chaplain)
on Jan 07, 2013 at 20:14 UTC ( #1012104=note: print w/replies, xml ) Need Help??

in reply to capture STDOUT when some jerk opened STDOUT to /dev/tty

Being just a clueless newbie, I'd create a simple module (call it MyOpen) that overrides CORE::open. Upon encountering a '/dev/tty' it can then substitute '/dev/null' or something more appropriate before calling CORE::open. Pack this into the invoking system / backticks using -MMyOpen. or set PERL5OPT.

  • Comment on Re: capture STDOUT when some jerk opened STDOUT to /dev/tty

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012104]
[marto]: Corion, pretty much. How are things? You were at LPW?
[Corion]: marto: Yep, but I didn't make it up north, sorry ;)
[Corion]: But LPW was enjoyable, even though it's always a bit hectic due to cramming everything into one day
[Corion]: I have no feeling about how my talk was received, but I'm happy with it, which counts the most to me ;-D

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2016-12-07 09:23 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (125 votes). Check out past polls.