Re: negative index in perl6 array

2009-06-23 Thread Matthew Walton
On Sat, Jun 20, 2009 at 12:07 PM, Chas. Owens wrote: > Hmm, I can't get [user-defined array indexes][1] working, and those > are a prerequisite for mixing subscripts (you can't mix normal and > user-defined indexes if you can't create user-defined indexes).  I > took a quick look at the tests and c

Re: negative index in perl6 array

2009-06-20 Thread Chas. Owens
On Sat, Jun 20, 2009 at 02:49, Aruna Goke wrote: > Chas. Owens wrote: >> >> On Sat, Jun 20, 2009 at 00:58, Aruna Goke wrote: >>> >>> is negative index not allowed in perl6? >>> >>> i tried >>> >>> my @test = (1 .. 20); >>> @test[-1].say; >>> >>> OUTPUT >>> Use of uninitialized value >>> >> >> You h

Re: negative index in perl6 array

2009-06-19 Thread Aruna Goke
Chas. Owens wrote: On Sat, Jun 20, 2009 at 00:58, Aruna Goke wrote: is negative index not allowed in perl6? i tried my @test = (1 .. 20); @test[-1].say; OUTPUT Use of uninitialized value You have to say @test[*-1].say; now http://perlcabal.org/syn/S09.html#Negative_and_differential_subs

Re: negative index in perl6 array

2009-06-19 Thread Chas. Owens
On Sat, Jun 20, 2009 at 00:58, Aruna Goke wrote: > is negative index not allowed in perl6? > > i tried > > my @test = (1 .. 20); > @test[-1].say; > > OUTPUT > Use of uninitialized value > You have to say @test[*-1].say; now http://perlcabal.org/syn/S09.html#Negative_and_differential_subscripts