On Mon, May 21, 2012 at 11:50 AM, Parrot Raiser <1parr...@gmail.com> wrote: > ./perl6 -e 'my @a = < A B C >; @a = lc @a; say @a, " Size = ", @a + 0;' > a b c Size = 1 > > Is this the way lc is supposed to operate on the elements of an array? > > I.e. converting the individual elements of the source, but combining > them into one element in the destination.
lc on the array here is returning the string "a b c"; The array is getting flattened to a string, passed into lc, which then returns a string, which is then set as the first element of the array. If you want to lc the elements of the string in place, you need to act on the array elements, not the array itself, e.g.: > my @a = <A B C>; @a».=lc; say @a; say @a+0 a b c 3 Regards. -- Will "Coke" Coleda