my %h : shared; $h{foo} = share ({}); ... $h{foo}{bar} = 1; # in thread 1 $h{foo}{bar} = 2; # in thread 2