http://www.perlmonks.org?node_id=570262
KevinZwack has asked for the wisdom of the Perl Monks concerning the following question:

I've been able to create thread shared hashes of hashes and so forth... but the syntax to create a hash of anonymous arrays has me stumped. Getting this little snippet of code to work would be helpful. In fact, any help would be greatly appreciated.

Thanks,
Kevin Zwack

#!/usr/bin/perl5.8.8 -w use Data::Dumper; use threads; use threads::shared; my ($i, $j, $k) = (1, 2, 3); my %foo :shared; $foo{'bar'} = &share([]); #<-- Not what it wants $foo{'bar'} = [$i, $j, $k]; print Data::Dumper->new([\%foo],[qw(foo)])->Indent(4)->Quotekeys(1)->S +ortkeys(1)->Dump; exit;