in reply to Quicly extracting odd index elements in the array with grep
my @arr = (1,2,3,4,5,6); my $ind = 0; my @result = grep {$ind++ % 2} @arr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Quicly extracting odd index elements in the array with grep
by GrandFather (Saint) on Aug 10, 2006 at 04:53 UTC | |
by ssandv (Hermit) on Dec 09, 2009 at 18:54 UTC | |
|
Re^2: Quicly extracting odd index elements in the array with grep
by Anonymous Monk on Aug 10, 2006 at 04:50 UTC | |
by tilly (Archbishop) on Aug 10, 2006 at 04:53 UTC |