There's more than one way to do things | |
PerlMonks |
Re: Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> };by skillet-thief (Friar) |
on Aug 31, 2003 at 06:22 UTC ( [id://287987]=note: print w/replies, xml ) | Need Help?? |
Maybe I'm missing something. Besides basic coolness, and getting it down to one line, I don't understand the specific advantage of using "do" as opposed to how I usually slurp:
That said, I do like the way the proposed idiom looks. Cheers, s-t
In Section
Meditations
|
|