in reply to Re: Common Perl Pitfalls
in thread Common Perl Pitfalls
my $slurp = do { open my $fh, '<', "inputfile"; local $/; <$fh> };
P.S. I really like the second one, thanks. Not for production use, of course. :)
Regards,
Alex.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Common Perl Pitfalls
by JavaFan (Canon) on Apr 10, 2012 at 23:32 UTC | |
by dwalin (Monk) on Apr 10, 2012 at 23:50 UTC | |
by JavaFan (Canon) on Apr 10, 2012 at 23:57 UTC | |
by dwalin (Monk) on Apr 11, 2012 at 00:24 UTC | |
by JavaFan (Canon) on Apr 11, 2012 at 00:37 UTC |