![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Automatic trace statements in programby orbital (Scribe) |
on Mar 20, 2001 at 23:40 UTC ( #65785=note: print w/replies, xml ) | Need Help?? |
If all your trying to do is write to a specific log file, operations that the program preformed try this:
A few things to note: the >> in open refer to opening the file for append, if you want to destroy the file during each execution use a single > select followed by a FILEHANDLE sets all commands that normally directed towards STDIN (print, printf write etc..) to point towards the specified FILEHANDLE. One other note it is important to error check opening and closing of files, if the file didn't close properly you would want to know before your HD filled up.
In Section
Seekers of Perl Wisdom
|
|