Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Shared hash of anonymous arrays?

by mreece (Friar)
on Aug 29, 2006 at 22:17 UTC ( [id://570267]=note: print w/replies, xml ) Need Help??


in reply to Shared hash of anonymous arrays?

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!)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://570267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-20 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found