It's maybe worth noting that the do would need to be put in a BEGIN block to have it execute at compile time
BEGIN { do "MyVars.pm" }
And for anyone unsure what the difference is: in contrast to require, do doesn't keep track of what's already been loaded — which could make a difference if you use MyVars several times (in different namespaces) in the same script/program.
In reply to Re^3: Trying to create a common "variable library"
by almut
in thread Trying to create a common "variable library"
by tbblake
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |