Larry Wall skribis 2004-09-03 17:08 (-0700):
> The element with index -1.  Arrays with explicit ranges don't use the
> minus notation to count from the end.  We probably need to come up
> with some other notation for the beginning and end indexes. 

    @array.abs[0];
    @array.abs[-1];

.abs would be an alternative interface for the array, where 0 is always
the first element.

The real index is then 

    ( $abs_index >= 0 ?? @array.first :: @array.last + 1 ) + $abs_index


Juerd

Reply via email to