playingwithbots has asked for the wisdom of the Perl Monks concerning the following question:
my $ref:shared = {};
because I want to share a hash that I'm using like:
$ref->{a}[0] = something; $ref->{a}[1] = somethingelse;
and need to share the data structure between my main routine and a thread.
But I get errors saying I can't make the ref shared. Anyone know how to "share" a reference. I also get an error when I try to:
my $ref:shared = someobj::new();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: references and :shared
by jasonk (Parson) on Feb 25, 2003 at 18:18 UTC | |
by playingwithbots (Novice) on Feb 25, 2003 at 18:31 UTC |