use threads; use threads::shared; my %h : shared; my $ar : shared = []; $h{test} = $ar;