You can open your log-file at the start of your program and just write to it with the print statements:
my $logfile = 'path/to/logfile.txt'; open(LOG, "> $logfile") or die "could not open log-file: $!"; print LOG "this is a log entry\n";
If you need to see your log output immediately be aware of buffering issues ...
cheers
si_lence
In reply to Re: Building a log file
by si_lence
in thread Building a log file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |