For the most part I agree with
{NULE}. I generally do something similar, but like
podmaster I generally put in levels so
log 3, $message only prints if the log level is 3 or greater. I have also created systems where I send the data to syslog (both on *nix and win32) at facility LOG_LOCAL0. This allows configuring the log behavior without editing the perl script. This is important for programs that run continuously. I even sometimes have the program respond to signals or other user input to chnage the log level at run time. There are multiple
syslog modules on cpan, and activestate ships with syslog.pl (which requires a syslog.ph unless you hack it) for Windows.
HTH, --traveler