But your use of parenthesis still makes it ambiguous. Perl may now guess right, but it's still a guess. {("x$_" => 1)} can still be a hashref. Perl will guess incorrectly if it's written as:
But feel free to do whatever works for you. Don't do something just because others do it, or not do something because others don't.my @y = map { ("x$_" => 1) }, qw(a b c);
In reply to Re^3: map problem
by JavaFan
in thread map problem
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |