in reply to refering to 1 shared hash from another
This works for me
use threads::shared; use Carp qw(cluck); my %all_shary_for_subs :shared; my %sim_info :shared; $all_shary_for_subs{'%sim_info'}=\%sim_info; cluck("the sim_info glob ref is:" . \%sim_info . "\n" ); cluck("And in the hash it is:" . $all_shary_for_subs{'%sim_info'} . "\ +n" )
Output:
the sim_info glob ref is:HASH(0x94b194) at C:\Documents and Settings\1161732\Perltest\scratch.pl line 9. And in the hash it is:HASH(0x94b194) at C:\Documents and Settings\1161732\Perltest\scratch.pl line 10.
Where is the rest of your code? This bit is missing the use so I gues it is a fragment pulled from something larger. Can you please post running code that shoes the behaviour you are seeing?
Cheers,
R.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: refering to 1 shared hash from another
by space_monk (Chaplain) on Apr 24, 2013 at 11:26 UTC | |
by ISAI student (Scribe) on Apr 24, 2013 at 12:06 UTC | |
by Random_Walk (Prior) on Apr 24, 2013 at 12:46 UTC | |
by Random_Walk (Prior) on Apr 24, 2013 at 12:26 UTC |