Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re (tilly) 1: IO::Tee not behaving correctly

by tilly (Archbishop)
on Mar 16, 2002 at 01:00 UTC ( #152116=note: print w/ replies, xml ) Need Help??


in reply to IO::Tee not behaving correctly

Two things to check.

The first is that something might be doing a select or missing up the tie. I would try in the middle of your script calling tied to see if the tie has survived, and select to see if the output is going where you think.

The second is whether you are producing output at the C level. For instance if you call system or fork, the child processes will talk directly to STDOUT without any chance for Perl's IO layer to capture it and notice the tie.

In either case, the cookbook has an alternate recipe that might interest you where you fork and filter STDOUT after the fact. This is more heavyweight, but is a less fragile approach.


Comment on Re (tilly) 1: IO::Tee not behaving correctly

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2014-07-30 07:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls