|
Posted by Sisyphus on June 26, 2006, 9:13 pm
Please log in for more thread options
> I have this simple Mime::Lite script quoted below.
> It works alright.
> But I would like to trace the result of the output.
> Something like
> set -x in ksh
> or anything else similar.
> Or some logging?
> What should I do and where should I put it?
>
At the beginning of your script:
open LOG, ">>/path/to/logfile" or die "Can't open log: $!";
Then, throughout your script, whenever you want to write something to the
logfile:
print LOG "Whatever you want to put in the logfile";
And at the end of the script:
close LOG or die "Can't close log: $!";
Cheers,
Rob
|