http://qs1969.pair.com?node_id=737144


in reply to mysterious threads::shared behaviour

threads::shared uses a mechanism similar to tying, so if you do $x = $h{$_}, then $x isn't a reference to a hash, its a reference to an 'LV' scalar variable, who's action on being accessed is to call the appropriate method that gets or stores a value in the real shared hash (with suitable locking). These LV scalars are temporaries created on demand and freed when no longer used, so you are likely to see address re-use.

Dave.