in production code is a real pain.my $contents = do { local (@ARGV, $/) = $filename; <> };
This, on the other hand
is just fine.# Slurp file my $contents = do { local (@ARGV, $/) = $filename; <> };
Very cool, BTW.
ADDED: --/me for not noticing Aristotle's post saying the same thing.
()-() \"/ `
In reply to Re: Cheap idioms
by ignatz
in thread Cheap idioms
by Juerd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |