On 11/09/2010 09:26 PM, TSa (Thomas Sandlaß) wrote:
> But doesn't
>
> my $x = (1,2,3);
> my $y = map {$^x * $^x}, $x;
>
> result in $y containing the list (1,4,9)? Not at all. The $ sigil implies a scalar, so what you get is roughly my $y = (1, 2, 3).item * (1, 2, 3).item; so $y ends up with a single list item of 9. Cheers, Moritz
