XP is just a number | |
PerlMonks |
Re: global variable in a packageby ysth (Canon) |
on Jan 02, 2006 at 07:49 UTC ( [id://520355]=note: print w/replies, xml ) | Need Help?? |
Can you show some code? You seem to be contradicting yourself: "the hash is used only in a function in that package" vs. "the Module which is accessing the hash is different from the module which contains the hash".
You can access a global variable in a different package by prefixing with the package name, e.g. keys %packagename::hash
In Section
Seekers of Perl Wisdom
|
|