On Thu, Mar 13, 2003 at 10:37:36PM -0600, david nicol wrote:
:
: > > However, if you access the last element using the length of the array,
: > > it may try to flatten, and fail:
: > >
: > > my @flat = (1..Inf, 1..10);
: > > $last = @[EMAIL PROTECTED] - 1]; # Kaboom!
:
: How about nega
> > However, if you access the last element using the length of the array,
> > it may try to flatten, and fail:
> >
> > my @flat = (1..Inf, 1..10);
> > $last = @[EMAIL PROTECTED] - 1]; # Kaboom!
How about negative indices? We have negative indices in the slice()
semantics; what if
Larry Wall writes:
> However, if you access the last element using the length of the array,
> it may try to flatten, and fail:
>
> my @flat = (1..Inf, 1..10);
> $last = @[EMAIL PROTECTED] - 1]; # Kaboom!
>
> Still, we should be able to detect the attempt to flatten an infinite
> lis