# loop over all but last element for ( my $i = 0; $i < @array - 1; ++$i )