Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: Tee Module

by Ballistic (Initiate)
on Mar 15, 2013 at 14:49 UTC ( #1023714=note: print w/ replies, xml ) Need Help??

in reply to Re: Tee Module
in thread Tee Module


Reading this gave me the idea of doing it like this.

# Open Log File for writting open (LOGFILE, "> logfile.txt") or die ("Unable to open LogFile.\n"); sub dualprint { print "@_"; print LOGFILE "@_"; } sub logprint { print LOGFILE "@_"; }
And then all print commands are replaced with dualprint, and the input stuff is printed with logprint to a log file only, because it is printed to the screen anyway.

Thank you so much!

Comment on Re^2: Tee Module
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2015-05-03 08:53 GMT
Find Nodes?
    Voting Booth?

    In my home, the TV remote control is ...

    Results (69 votes), past polls