in reply to Re^2: Quicly extracting odd index elements in the array with grepin thread Quicly extracting odd index elements in the array with grep
my @arr = (0,1,2,3,4,5,6,8,10); my $ind = 0; my @result = grep {1 == $ind++ % 3} @arr; [download]