Re: Is < > creating and Array or Parcel ?

2015-08-03 Thread Gabor Szabo
On Mon, Aug 3, 2015 at 3:49 AM, Larry Wall wrote: > On Sun, Aug 02, 2015 at 03:09:07PM +0200, Moritz Lenz wrote: > : If you want to extract it from the scalar, use the @ again, this > : time as a prefix: > : > : for @$s { } # two iterations again. > > Note that this distinction will go away after

user programming mistakes

2015-08-03 Thread mt1957
Hi, I there a way to prevent some type of mistake I now have made several times merely because the error messages are not helping me to point to the problem. Example; grammar Turtle::Grammar { rule TOP { * } ... rule directive { | } ... rule base { '@base'*

Re: Is < > creating and Array or Parcel ?

2015-08-03 Thread Lloyd Fournier
Non expert opinion here. my $z = ['a', 'b', 'c']; Is a real array. The difference is that is in a non-auto flattening container (variable). If you want to iterate over it you can: for @$z { ... } # like perl5 If you want to assign it to @ array then do the same thing @a = @$z. If you want to a

Re: Is < > creating and Array or Parcel ?

2015-08-03 Thread Richard Hainsworth
Having followed Perl6 from its inception, it is good to see Christmas will be coming this year :) Richard On 08/03/2015 08:49 AM, Larry Wall wrote: On Sun, Aug 02, 2015 at 03:09:07PM +0200, Moritz Lenz wrote: : If you want to extract it from the scalar, use the @ again, this : time as a prefi

Re: Is < > creating and Array or Parcel ?

2015-08-03 Thread Marc Chantreux
On Sun, Aug 02, 2015 at 10:35:23PM +1000, Lloyd Fournier wrote: > If you want to assign to an array which is an element of another array: > > @a = $z[0].list this is very confusing because this is not a LoL. $z.flat seems more intuitive to me. -- Marc Chantreux (eiro on github and freenode) htt

Re: user programming mistakes

2015-08-03 Thread Parrot Raiser
I think actually belongs under the "LTA error message" category. On 8/3/15, mt1957 wrote: > Hi, > > I there a way to prevent some type of mistake I now have made several > times merely because the error messages are not helping me to point to > the problem. > > Example; > >grammar Turtle::Gra

Re: Is < > creating and Array or Parcel ?

2015-08-03 Thread Timo Paulssen
On 08/02/2015 02:35 PM, Lloyd Fournier wrote: > @a = $z[0].list > > or in a less documented way: > > @a = $z[0]<> > > The idea is that you can store an array in ether a @ or $ variable. > Where as in perl5 you could only store a reference in $ variable. The > sigil simply tells perl6 how it shoul