Why I get this error?
Thread 1 terminated abnormally: Invalid value for shared scalar at thr_hash.pl line 8.
use threads;
use threads::shared;
use Data::Dumper;
my %h:shared;
threads->create(sub{
$h{manager} = {
name => 'John',
surname => 'Doe',
age => 27
};
})->detach;
sleep 1;
print Dumper \%h;