Jeff Clites:
> But there's a semantic difference between a "reference to a hash 
> element" and a "reference to something which happens to have come out 
> of a hash".

True, but irrelevant. :)

> $a = $hash{bar};

Here you used the copy constructor before taking the reference. It might look
like an assignment operator, but it isn't. You're better off thinking that
assignment doesn't exist. It's a copy constructor. It makes the PMC referred
to by $a a copy of the PMC in $hash{bar}. Their values may be "equal" but
they're two different PMCs.

> $b = \$hash{bar};

Here you didn't make a copy before taking the reference. No copy, only one
PMC. It all works.

-- 
BITTERNESS:
    Never be Afraid to Share Your Dreams with the World,
    Because there's Nothing the World Loves More Than The Taste of
    Really Sweet Dreams                              http://www.despair.com

Reply via email to