in reply to Re: file open with variables
in thread file open with variables
The usual rant about using lexical filehandles will come shortly
So as not to disappoint the choroba: always use lexical filehandles!!! (and the 3-argument form of open).
Further to kcott's exemplary sample code, which uses the recommended 3-argument form of open with a lexical filehandle, note that lexical filehandles are automatically closed at end of scope (used here to illustrate how Perl garbage collection differs from Java).
|
|---|