for my $i (0 .. @arr - 2)