Is it really the case that setting aside a value to be restored at the end of scope is what is meant by “dynamic scoping”?Yes.
And package variables allow for dynamic scoping of their values. Lexical variables have lexical scoping. It's that simple. Perl gives you options. Want lexical scoping? Use lexical variables. Want dynamic scoping? Use package variables and local.
What's the problem?
In reply to Re^5: Local for lexicals
by JavaFan
in thread Local for lexicals
by JadeNB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |