Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Logging output of a script to screen AND file

by bobf (Monsignor)
on Aug 07, 2010 at 03:34 UTC ( #853513=note: print w/replies, xml ) Need Help??


in reply to Logging output of a script to screen AND file

I have used IO::Tee in the past. IIRC, it was pretty simple and did the job.

use IO::Tee; $tee = IO::Tee->new( $handle1, $handle2 ); print $tee "foo";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://853513]
help
Chatterbox?
[Discipulus]: yes I know, bro' and I also know I cannot compete. But no one ask for oneliners.. ;=)
[Discipulus]: and i'm just happy for rising the black camel in the main ladderboard

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2017-10-22 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (275 votes). Check out past polls.

    Notices?