Sprad has asked for the wisdom of the Perl Monks concerning the following question:
According to the Camel, filehandles will automatically close if they're re-open()ed. And I'd bet they also close when the program terminates. But do they ever close at any other time?
For instance, say I have this sub:
Will myfile.txt still be in use outside of writefile()?sub writefile { open (FILE, ">>myfile.txt"); print FILE "hello\n"; }
---
A fair fight is a sign of poor planning.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: When do filehandles close?
by tachyon (Chancellor) on Jul 22, 2004 at 23:51 UTC | |
by pg (Canon) on Jul 23, 2004 at 00:04 UTC | |
Re: When do filehandles close?
by jZed (Prior) on Jul 22, 2004 at 23:41 UTC | |
Re: When do filehandles close?
by beable (Friar) on Jul 22, 2004 at 23:57 UTC | |
by gaal (Parson) on Jul 23, 2004 at 06:49 UTC | |
by beable (Friar) on Jul 23, 2004 at 07:19 UTC | |
by gaal (Parson) on Jul 23, 2004 at 08:01 UTC | |
Re: When do filehandles close?
by nothingmuch (Priest) on Jul 23, 2004 at 13:02 UTC |
Back to
Seekers of Perl Wisdom