On Sat, Aug 9, 2008 at 7:01 AM, Audrey Tang <[EMAIL PROTECTED]> wrote: > One is a List and one is an Array; you cannot push into a list, but you can > into an array. > > my @a := (1,2,3); > my @b := [1,2,3]; > > @a.push(4); # fails > @b.push(4); # works
But note that the first push fails because the symbol @a was *bound* to the list. After an ordinary assignment my @a = (1,2,3); @a is still an array, which just happens to have been initialized from a list. @a.push(4); # succeeds -- Mark J. Reed <[EMAIL PROTECTED]>