my @arr = (1,2,3,4,5,6); my $ind = 0; my @result = grep {$ind++ % 2} @arr;
In reply to Re: Quicly extracting odd index elements in the array with grep
by tilly
in thread Quicly extracting odd index elements in the array with grep
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |