Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Tee Module

by vinoth.ree (Monsignor)
on Mar 15, 2013 at 12:54 UTC ( #1023685=note: print w/replies, xml ) Need Help??


in reply to Tee Module

Replies are listed 'Best First'.
Re^2: Tee Module
by Ballistic (Initiate) on Mar 15, 2013 at 14:49 UTC
    Thanks!

    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!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023685]
help
Chatterbox?
[1nickt]: Ya gotta love the google. If you set accept=".txt" in a form input field where type="file", Chrome will allow you to select local files with extensions like .pl, .pm, .yaml, .ini etc. Nice!

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-07-22 18:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (340 votes). Check out past polls.