fxmakers has asked for the wisdom of the Perl Monks concerning the following question:


Here's my code:
use threads; use threads::shared; my %hash : shared; my $var = "hello"; $hash{'foo'}{'bar'} = 1; $hash{$var}{'bar'} = 1;
Script is not interpreted and returns: Invalid value for shared scalar at line 7.
Can't create a shared hash of hashes.
$hash{'foo'} = 1; #works fine.
perl -v: This is perl, v5.8.2 built for cygwin-thread-multi-64int

Any ideas?


Edited by Chady -- added code tags.