combining map and for gives two nested loops.
maybe you meant this?
DB<104> my $i=-1; @m= map { $i++; $_=~/xxx/ ? $i :() } @a => (1, 4, 6)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re^3: shorter 1 liner way of doing this
by LanX
in thread shorter 1 liner way of doing this
by theleftright
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |