Lexical file handles
Date: Sat, 6 Nov 2004 14:17:01 +1300
Now that recent versions of Perl have lexical file handles, can anyone give
me some practical examples of why they are useful/better.
The only thing I can think of is that with 'use strict', you'll catch typos
in your filehandles, however I'm sure there's plenty of other reasons.
- Re: Lexical file handles
... Tintin wrote: ... > Now that recent versions of Perl have lexical file handles, ... > anyone give me some practical examples of why they are useful/better. ...
- Re: Extreme beginner question on reading lines from a file.
... What is a lexical file handle? ... I'm working my way through Ford's "Perl Programming for the Absolute Beginner" and Lee's "Beginning Perl", and they both use the FH style of file handle. ... > line1 and line2 ... it does not use strict ...
- Re: File handle re-use woes using pipe within a loop
... I recon its pretty similar to the pseudocode below, ... of perl to demonstrate exactly the below.. ... > firstname.lastname@example.org (Mark Gowans) wrote: ... > I'd recommend using strict and lexical file handles, ...
- Re: convention regarding lexical filehandles
... :) Prior to the invention of lexical file handles, ... :) convention that filehandles should be given in all capital letters: ... :) consensus as towards this convention. ... There aren't many conventions in Perl which have reached 'consensus'. ...
- Re: Sorting and Writing Effecient Code
... >>> Perl closes any open filehandles when it exits anyway. ... x> lexical file handles are automatically closed when they go out of ... make anon handles for me and those also closed upon exiting scope. ...