fxmakers has asked for the wisdom of the Perl Monks concerning the following question:
Hi!
Here's my code:
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?
Thanks!
-UPDATED POST-
Here's my code:
Script is not interpreted and returns: Invalid value for shared scalar at test.pl line 7.use threads; use threads::shared; my %hash : shared; my $var = "hello"; $hash{'foo'}{'bar'} = 1; $hash{$var}{'bar'} = 1;
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?
Thanks!
-UPDATED POST-
Edited by Chady -- added code tags.
Back to
Seekers of Perl Wisdom