ISAI student has asked for the wisdom of the Perl Monks concerning the following question:
The output of the code is the following (everything else is just use Carp, threads, threads::shared and comments)my %all_shary_for_subs :shared; my %sim_info :shared; $all_shary_for_subs{'%si +m_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" ) ;
the sim_info glob ref is:HASH(0x241bea8) at /edata/eng/ldagan/voodoo_from_1.1.7.b4/DesignLibs/ScriptLib/Generic/WMPerl/voodoo/voodoo_beta.pl line 81 And in the hash it is:HASH(0x2e42990) at /edata/eng/ldagan/voodoo_from_1.1.7.b4/DesignLibs/ScriptLib/Generic/WMPerl/voodoo/voodoo_beta.pl line 82
Why are the two addresses different?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: refering to 1 shared hash from another
by Random_Walk (Prior) on Apr 24, 2013 at 11:16 UTC | |
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 |