use threads; use threads::shared; my %sa : shared = (); %{$sa{foo}} = (); __END__ Invalid value for shared scalar at share_share.pl line 5.