in reply to printing and logging to a file
Then when you print, "whatever" would end up in file.txt and STDOUT. Here are two examples of TIEHANDLE Re: Line Numbers Re: monitor STDOUT in scalar. Also, if you choose to implement a tie interface, be sure to advice given by japhy at Tie-dy up our namespaces.{ use Tie::Handle::StdOutAndFile; local *STDOUT; tie(*STDOUT,'Tie::Handle::StdOutAndFile','file.txt') or die "Aaah $ +!\n"; print "whatever"; }
| ______crazyinsomniac_____________________________ Of all the things I've lost, I miss my mind the most. perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;" |
|
|---|