There's more than one way to do things | |
PerlMonks |
Re: How to access main package global vars in modulesby philipbailey (Curate) |
on Jul 07, 2011 at 19:20 UTC ( [id://913246]=note: print w/replies, xml ) | Need Help?? |
There are several alternative one line changes that do what you ask, such as:
But none of the above is recommended. You would be much better in most scenarios to make functions.pl a package, and pass lexical variables as parameters to its functions.
In Section
Seekers of Perl Wisdom
|
|