in reply to a global hash?
Do you mean sharing values within the same script or among multiple scripts / modules?
If it is the firs one then the easiest way is to have a global variable, i.e. one declared in the outermost scope, you don't need our to do this, read the docs carefully and you'll see what you really want is my. There are obviously dangers (overwriting etc...) with having global variables, but there are ways round this (for example you can 'lock' hashes ( see Hash::Util ) ).
Alternately you can pass variables between subs as references. There are tutorials in the Monastery to help here.
For true 'sharing' of variables, Super Search and CPAN are your friends! HTH!
|
|---|