The "$" is useless.
In the spirit of the OP, here's a (shorter!) variation that uses map:
my %h = do { local @ARGV = $file; map /^(.*?) = (.*)/, <> };
One should probably localize $^I when localizing @ARGV.
In reply to Re^2: Probably an easy map question
by ikegami
in thread Probably an easy map question
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |