in reply to Re: Use a hashref as a key in another hashref?
in thread Use a hashref as a key in another hashref?
The problem with this is that reference addresses are not guaranteed to be unique. If a hash is destroyed (e.g. has gone out of scope), then its address can be re-used when a new hash is created. On my machine at least, the following prints the same reference address twice:
{ my $x = { foo => 1 }; print $x, "\n"; } { my $y = { bar => 2 }; print $y, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Use a hashref as a key in another hashref?
by LanX (Saint) on Jun 05, 2014 at 10:21 UTC |