I don't want to pass this variable from foo.pl
Why not? By accessing or manipulating the variable as a global variable it can be very difficult to determine where the value comes from and when or why it changes. By explicitly passing the value in as an argument to a sub or constructor it is much easier to manage and debug the code relating to it.
In reply to Re: Using variables in top level script inside the perl modules
by GrandFather
in thread Using variables in top level script inside the perl modules
by alih110
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |