You can obfuscate this if you wish...@even = @array[map 2*$_, 0..$#array/2]; @odd = @array[map 2*$_+1, 0..$#array/2];
In reply to RE: Fetch every other item in a list
by japhy
in thread Fetch every other item in a list
by BooK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |