in reply to Modules sharing?
in the open_log_and_error() function. That way, module 2 can use module 1 and be sure that the log file won't be opened twice when you call open_log_and_error in both places. The package variable $LOG will be the same for both the module and the script.unless (defined $LOG) { open $LOG, "file"; ... }
|
|---|