Gunnar Hjalmarsson schreef:
> Dr.Ruud:
>> Gunnar Hjalmarsson:

>>>      my $content = do { local $/; <$file> };
>>
>> That idiom uses an extra buffer, as big as the file.
>>
>>        my $content; { local $/; $content = <file> }
>
> Does it? In that case, why is it mentioned at
> http://faq.perl.org/perlfaq5.html#How_can_I_read_in_an

Because it looks and reads nice? But probably you mean I should have
submitted a bug report. Well, this idiom gets discussed a few times per
year in news:comp.lang.perl.misc and still many people stick to the
wasteful way, because in practice it often doesn't matter that much.

Now find the problem in the example code in `perldoc -f alarm`.

-- 
Affijn, Ruud

"Gewoon is een tijger."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to