The standard ways to help Perl interpret expression (hash ref) vs. block correctly, is like this:
map +{ "$_" => 1 }, @list # + => expression (hash ref) (+ comma) map {; "$_" => 1 } @list # ; => block (no comma)
In reply to Re^3: Error with doublequotes in map
by bart
in thread Error with doublequotes in map
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |