http://www.perlmonks.org?node_id=1086116


in reply to conditional statement works one way, but not the other (Updated)

You can't use for/foreach in an expression. You can replace it with map easily, though.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ