SPUG: Looking for a graceful way to deal with file handles and modules

caseyt at metaip.checkpoint.com caseyt at metaip.checkpoint.com
Tue Sep 28 16:32:15 CDT 1999

Hi again Perl gurus and generally smart people,

I have a question about file handles and modules and how they can get all
mixed up. Here is what I have:

Main Script (many of these)
	Opens and writes to a file handle.

Perl Module (has all of the subroutines for all the main scripts)
	Also needs to write to the file.

The solutions I can think of are:

1. Open and close the file handle every time I write to it.
2. Have file handles open to the file in the module and the script at the
same time.

Is there some graceful way that I can reference an open filehandle in my
main script from the Perl module that has been called? Something pretty like

Thanks again,


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address

More information about the spug-list mailing list