in reply to Sharing a log file across classes...

This may be too simplestic a solution but you could write
any output that needs to be logged to STDOUT or STDERR and
start your script like so ...

myScript.pl >& log