dbaad has asked for the wisdom of the Perl Monks concerning the following question:
I want to have a subroutine that I can call from anywhere in my script that I will use to handle errors and then exit. The problem is....at any one point, I might have a variety of filehandles open for log files, config files, whatever.
Rather than specifying to close them all by name in the sub, is there a way to close them all generically, or is it even necessary?
Any knowledge shared is surely appreciated!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: filehandle cleanup
by Zaxo (Archbishop) on May 04, 2004 at 21:37 UTC | |
|
Re: filehandle cleanup
by geekgrrl (Pilgrim) on May 04, 2004 at 22:37 UTC | |
|
Re: filehandle cleanup
by Corion (Patriarch) on May 05, 2004 at 06:32 UTC | |
|
Re: filehandle cleanup
by Belgarion (Chaplain) on May 04, 2004 at 21:39 UTC | |
by dbaad (Initiate) on May 04, 2004 at 21:43 UTC |