CodeJunkie has asked for the wisdom of the Perl Monks concerning the following question:
Hi Perl Monks,
Just a quick question for you gurus, can anyone tell me how I can use strict in my script, yet still import a hash using the require statement?
Basically I have include.pl which includes a %SETTINGS hash. I want to use this in script.pl. However, use strict requires that I scope all my variables in script.pl... so how can I get around this? If I scope in script.pl
I.e. my %SETTINGS;The include doesn't work properly, however if I scope in include.pl it doesn't work either.
What can I do?
Thanks,
Tom
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use strict and require
by dragonchild (Archbishop) on Mar 12, 2003 at 22:42 UTC | |
|
Re: use strict and require
by huguei (Scribe) on Mar 12, 2003 at 22:35 UTC | |
|
Re: use strict and require
by Cabrion (Friar) on Mar 13, 2003 at 00:14 UTC | |
|
Re: use strict and require
by perrin (Chancellor) on Mar 12, 2003 at 22:47 UTC | |
|
Re: use strict and require
by virtualsue (Vicar) on Mar 13, 2003 at 10:59 UTC |