in reply to Modules sharing?

You should be able to just do something like
unless (defined $LOG) { open $LOG, "file"; ... }
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.

The only problem I can see is if you have two instances of this script running at once, in which case it might be better to open and close the log file each time you want to write to it.