P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
note the synopsis from 'perldoc threads::shared' uses the :shared attribute or the share() function, but not both on the same variable.
try removing the :shared attribute from the my %foo declaration. (do you intend to share the entire hash %foo or only $foo{bar}?) updated: i'm potentially way off base there, i am able to get it to 'work' (that is, stop producing the "Invalid value for shared scalar" error) using this approach or the others mentioned (@{$foo{'bar'}} = ($i, $j, $k);). it does seem plausible that you can't re-assign a new array-ref to a shared variable, but who knows what magic lurks beneath...? (not i!) In reply to Re: Shared hash of anonymous arrays?
by mreece
|
|