use threads; use trheads::shared; ## Non-shared hash assigned some data: my %d = (1 .. 10 ); print Dumper \%d; $VAR1 = { '1' => 2, '3' => 4, '7' => 8, '9' => 10, '5' => 6 }; ## Share a reference to that hash and assign it to a shared scalar my $r:shared = share( %d ); ## And not only will the reference point to an empty hash print Dumper $r; $VAR1 = {}; ## But also the contents of the original hash will have been silently discarded print Dumper \%d; $VAR1 = {};