On Tue, Jan 28, 2003 at 01:30:54PM -0600, Jonathan Scott Duff wrote:
> On Tue, Jan 28, 2003 at 11:15:26AM -0800, Michael Lazzaro wrote:
> > 2) Assume the default value is a simple value, e.g. 'foo'.
> > 
> >      my @a is Array( default => 'foo' );
> >      @a[5] = 'bar';
> > 
> >      @a[4];     # 'foo'
> >      @a[5];     # 'bar'
> >      @a[6];     # 'foo'
> > 
> >      @a[-1];    # 'bar'   *NOTE!*
> 
> Um ... why?

Ah, nevermind ... I just realized that you were counting backward from
the end of the array.  Such behavior would be surprising at best.
Perhaps the indexing-from-the-end magic and the auto-defaulting magic
need to be mutually exclusive.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to