What's the difference between dynamic and lexical (static) scoping? Between local() and my()?local($x) saves away the old value of the global variable $x, and assigns a new value for the duration of the subroutine, which is visible in other functions called from that subroutine.
...
my($x) creates a new variable that is only visible in the current subroutine.
In reply to Re: I need a simple explantion of the difference between my() and local()
by mothra
in thread I need a simple explantion of the difference between my() and local()
by Jemts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |