If you're going to use a C-style loop, why use the extra $i++?
for (my $i=1; $i<=$#input; $i+=2) { push @output, $input[$i] }
...roboticus
In reply to Re^2: Get even postion elements in an array
by roboticus
in thread Get even postion elements in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |