in reply to Automatically exiting a file within a block
As the others have said, lexical filehandles are closed automatically when they go out of scope. This does not apply to bareword filehandles such as open FILE, ..., these are essentially globals. Note that you can arrange to have other code executed at the end of the current lexical scope via the End module, although I haven't seen much code in the wild actually doing so.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Automatically exiting a file within a block
by null recurrent (Novice) on Jun 23, 2019 at 23:39 UTC |