This is another instance of the problem that a pair of curlies can stand for an anonymous subroutine or a hash reference. You can disambiguate with a semicolon in the block:
my %y = map {; "prefix_$_" => 1 } qw(a b c);
It's more of a design limitation than a bug in perl or in you :-)
In reply to Re: map problem
by moritz
in thread map problem
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |