Syntactic Confectionery Delight | |
PerlMonks |
Re^2: strange syntax error with map (unary plus)by LanX (Saint) |
on Apr 09, 2017 at 13:52 UTC ( [id://1187524]=note: print w/replies, xml ) | Need Help?? |
> perl -wMstrict -le 'print map { +2, $_ } 1 .. 2' I'm not a big fan of the unary plus solution, since it's not easily understandable why the unary plus sometimes works or not. Fun with Perl's parsing:
so far so consistent, BUT
see my point? :)
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|