in reply to sharing filehandles

In case you still are looking, you may need to pass the fileno of the filehandle to share it. Like in threads, the filehandles can be shared between theads thru the fileno. So as long as all code share the same process something like this should work.
#UNTESTED # in one place open(LOG, " >/foo/logfile") or warn "$!\n"; my $fileno = fileno(LOG); # then pass the fileno somehow to the other package, # thru an option or our variable open (my $fh, ">&=$fileno") or warn "$!\n";

I'm not really a human, but I play one on earth CandyGram for Mongo