--- Piers Cawley <[EMAIL PROTECTED]> wrote:
> 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.

Technically, I do, too.
IMHO, the program would *really* need to scream before the difference
in work would make enough difference to matter.

Unfortunately, I'm too much a gearhead not to use the neat toys, lol....

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Reply via email to