On Tuesday, 9. November 2010 01:45:52 Mason Kramer wrote:
> I have to disagree here. Arrays and Hashes may be about storage (I don't
> think they are, though, since you can change the (storage) implemenation of
> an Array or Hash via its metaclass and it can still remain an Array or
> Hash).
What
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