Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Concise foreach expressionby LanX (Saint) |
on Aug 29, 2014 at 12:12 UTC ( [id://1098977]=note: print w/replies, xml ) | Need Help?? |
You are trying to combine postfix foreach and postfix if and running into two problems:
Your best bet for a concise expressions to be chained are map and grep print grep { /test/ } @names
updateN.B.: you are still limited to $_
updatewhich means you won't have much use of nested loops with map
Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :)
In Section
Seekers of Perl Wisdom
|
|