Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://853513]
[marto]: hey Corion, how's tricks?
[Corion]: marto: Currently all well - work is even OK currently ;) I should start translating my WWW::Mechanize:: Chrome talk to English and recheck that my demos all work, but I have two weeks for that still :)
[Corion]: So, most things are looking good :-D
[Corion]: I should write some more code for my Jekyll clone, but I don't feel like it, so maybe I should just let that linger instead ;)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-07-26 10:46 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (390 votes). Check out past polls.