"Andrew M. Langmead" wrote:
>
> On Wed, Mar 07, 2001 at 08:07:17PM -0500, [EMAIL PROTECTED] wrote:
> > I have a file with a hash in it and I wish to make the hash a global
> > variable in a perl script. I can eval it or require it, but the variable
> > doesn't seem to stay in the namespace. For example:
> >
> > require "config-file";
> > print $hash{key}; # Defined in config-file
> >
> > Prints nothing.
>
> We'd probaby have to see config-file to be sure, but my guess is that
> you are lexically scoping the has with my(). That makes the variable
> only visible within config-file.
Better yet, turn on warnings and use strict. That will let you
know if %hash has been declared.
--
----------------
Joe Johnston - http://aliensaliensaliens.com
"Only presidents, editors and people with tapeworms
ought to have the right to use *we*." -Mark Twain