in reply to Re^2: shorter 1 liner way of doing this
in thread shorter 1 liner way of doing this
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!
|
|---|