--- Dianne Van Dulken <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I was (yet again) hoping someone might help me with something.
>
> I have a cfg file called extra_details.cfg containing a hash
> %my_hash.
>
> I reference this in my perl script, using a require
> "extra_details.cfg"
>
> The problem now is that every time I try to reference my_hash in my
> script,
> whilst I am using strict, I get a
> Global symbol "%my_hash" requires explicit package name error.
>
> If I add an "my %my_hash;" anywhere, it overwrites the hash, so it is
> just a
> blank one.
>
> Does anyone know how I can get around this?
>
> It will work perfectly if I remove the "use strict" line, but I have
> these
> terrible qualms of guilt and fear every time I do so.
Just reference it expicitly:
%main::my_hash;
=====
print "Just another Perl Hacker\n"; # edited for readability =o)
=============================================================
Real friends are those whom, when you inconvenience them, are bothered less by it than
you are. -- me. =o)
=============================================================
"There are trivial truths and there are great Truths.
The opposite of a trival truth is obviously false.
The opposite of a great Truth is also true." -- Neils Bohr
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/