Paul <[EMAIL PROTECTED]> writes: > BTW, this is another use of the same sort of trick as > > { local $/ = undef; > $file = <FH>; # slurp the whole file into $file > } > > which is more efficient than > > while(<FH>) { $file .= $_ } > > or > > $file = join '', <FH>; > > Still, I have a coworker who swears by the latter as more work, yes, > but MUCH more readable in his opinion..... You know, I think I agree with your cow orker. The intent of the last version is obvious. It'd be interesting to see profiling data from a typical app that slurped in a whole file to see if the method of slurping made a significant difference in the running time. -- Piers Cawley www.iterative-software.com
- test for real number mikemckee
- Re: test for real number Walt Mankowski
- Re: test for real number Paul
- Re: test for real number Jeff Pinyan
- Re: test for real number Carl Rogers
- Re: test for real number Morten Sickel
- Re: test for real number Randal L. Schwartz
- Re: test for real number Paul
- Re: test for real number Randal L. Schwartz
- Re: test for real number Paul
- Re: test for real number Piers Cawley
- advanced: closures (was Re: test ... Jeff Pinyan
- Re: advanced: closures (was R... Randal L. Schwartz
- Re: advanced: closures (w... Randal L. Schwartz
- Re: advanced: closures (w... Jeff Pinyan
- Re: advanced: closures (w... Randal L. Schwartz
- Re: advanced: closures (w... Peter Scott
- Re: test for real number Timothy Kimball
- Re: test for real number Randal L. Schwartz
- Re: test for real number Paul