Good programming practice would be to pass the variable as a parameter into any function that required it.
Using "global" variables inside a function, particularly one in a different package, is a sign of bad program design.
--"The first rule of Perl club is you don't talk about Perl club."
In reply to Re: using main programs variables inside packages
by davorg
in thread using main programs variables inside packages
by asinghvi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |