This is a bit of a shot in the dark, but I was wondering if any of you knew how to overload a print statement to print to both a file and the screen?
Right now I am duplicating the print statements, ie print "hi\n"; print LOG "hi\n"; and that not only looks ugly, it is really bothersome for making changes to much of anything.
I could just run it | tee but I was really hoping for a nice pretty idiot proof way of doing it in perl that lets code changes be less frustrating.
Ideas?
In reply to Print to the screen and a log at the same time? by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |