John Williams writes: > On Sun, 5 Sep 2004, Matt Diephouse wrote: > > > Don't say -1st is the "first from last". If last is the opposite of > > first, I would expect 1st to mean "first from first," which would > > mean the second. Say "first from the end". > > It matches up with perl5 C<$array[-1]> and is a workable > interpretation of negative ordinals. > > So I could think that way too. > > @ary[ 1st .. -1st ] # hmm...
But it doesn't match up. In Perl 5 the first element is indexed with zero, not 1st, and the indices wrap round -- which is convenient in some circumstances, especially when representing grids of things. Using 1st and -1st means that there's a 'gap': the wrapping-round misses a number out, which then has to be dealt with as special case. (But personally I'm quite happy with zero-based arrays, so as long as -1 continues to work for those I'm not too bothered what happens with other cases.) Smylers