in reply to Concise foreach expression
Your best bet for a concise expressions to be chained are map and grep
print grep { /test/ } @names
N.B.: you are still limited to $_
which means you won't have much use of nested loops with map
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Concise foreach expression
by AppleFritter (Vicar) on Aug 29, 2014 at 16:43 UTC | |
by choroba (Cardinal) on Aug 29, 2014 at 17:14 UTC | |
by LanX (Saint) on Aug 29, 2014 at 17:00 UTC | |
by AppleFritter (Vicar) on Aug 29, 2014 at 17:21 UTC | |
by LanX (Saint) on Aug 29, 2014 at 17:42 UTC |