Abhijit Mahabal writes: > On Wed, 1 Dec 2004, Damian Conway wrote: > > > Abhijit Mahabal wrote: > > > > > I am a little confused if the following is valid perl6: > > > > > > our &xsub = { $x }; > > > > No. Illegal attempt to assign to a reference. You want aliasing/binding > > instead: > > > > our &xsub := { $x }; > > > > (I like to think of := as "assignment to symbol table entry".) > > Okay, that makes sense. A question about symbol tables, though: IIRC, only > packages have symbol tables, and blocks don't: they just have a lexical > pad. So is the C<our> redundent? Is the following an error? > > my &xsub := { $x }; > > ?
No, not an error. Lexical pads work just like symbol tables in Perl 6. You can muck around with them, too. Hooray! In fact, I expect that piece of code to be rather common in Perl 6. Luke