Encapsulation, the same reason we use my variables.
Limiting the scope of variables has a number of benefits. Primarily, that name clashes less likely, and that it's easier to find users of the variable. Don't underestimate the value of the latter; it's huge. Conversely, using variables as part of the module's interface creates a very rigid interface.
In reply to Re^3: Common subs and Global Variables
by ikegami
in thread Common subs and Global Variables
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |