![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Any downsides to this slurp idiom?by haj (Priest) |
on Jun 22, 2018 at 14:18 UTC ( #1217198=note: print w/replies, xml ) | Need Help?? |
If you don't mind spending a few more bytes, then I'd always include the file name in the message: my $data = do { open my $fh, '<', $file or die "'$file': $!"; local $/; <$fh> };
In Section
Seekers of Perl Wisdom
|
|