There are lots of modules on CPAN which exactly do that.
Have a look at (for example) Config::General or Config::Auto or Config::Framework or Config::Simple (this one has an option to either store the config-values in a hash or import them as variables in your namespace)
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Loading variables from a separate script
by CountZero
in thread Loading variables from a separate script
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |