for (my $i = 0; $i < $#array; $i+=2) { my ($first, $second) = @array[$i, $i+1]; # Do stuff here ... }