Perl Christmas Quiz 2009

Philip Newton philip.newton at gmail.com
Tue Dec 1 17:03:26 GMT 2009


On Tue, Dec 1, 2009 at 17:52, Dermot <paikkos at googlemail.com> wrote:
> (not sure about this point) is a copy of the value in $a{1}.

That's the salient point - it's an alias to the value in $a{1}, rather
than a copy, since values %hash returns aliasses, sort just shuffles
those aliasses, and foreach gives you an alias, too. So whatever you
do to $b happens to $a{1} as well.

Cheers,
Philip
-- 
Philip Newton <philip.newton at gmail.com>


More information about the london.pm mailing list