in reply to syntax error with map in list context
There are two ways to unconfuse perl about whether you mean a block or an anonymous hash, depending on which one it is:
+{ ... } is always considered an anonymous hash. The unary plus is generally used to explicitly signify that what follows is an expression.
{; ... } is always considered a block.
You’ll find that if you write your code as map {; ... } ..., it works.
Makeshifts last the longest.
In Section
Seekers of Perl Wisdom