|Welcome to the Monastery|
Getting a hash from a fileby jedikaiti (Hermit)
|on Mar 23, 2010 at 23:51 UTC||Need Help??|
jedikaiti has asked for the
wisdom of the Perl Monks concerning the following question:
I asked this in CB yesterday, but need further input...
I have a hash in a file. Literally, the file is a few lines of comments followed by...
All I want to do is call this somehow from my perl script, so that I can use the hash. I have no control over the creation of this file.
bart made the suggestion "Then look at do and require (and eval and use to get the whole picture)", which I did. I looked them up on perldoc.perl.org, and I'm not sure if they don't do what I want them to do, or if I'm just using them wrong. For example:
When I try to run this, it tells me Global symbol "%Verbs" requires explicit package name at test3.pl line 11. And on lines 13 and 17.
I do, however, want to keep this as simple as possible, and thought I'd ask here to make sure I'm not just doing something wrong with how I'm using do, or if there's another way.