in reply to Modern Perl: The Book: The Draft
In Chapter 10 "Easy File Slurping", you use this idiom for slurping:
my $file = do { local $/ = <$fh> };
For me the assignment to the localized $/ (that is done just so that the do-block returns the file-content) is confusing.
Clearer (for me):
my $file = do { local $/; <$fh> };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Modern Perl: The Book: The Draft
by chromatic (Archbishop) on Jul 25, 2010 at 21:42 UTC |