Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by clueless newbie (Hermit)
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2015-03-01 17:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (13 votes), past polls