3 ms·
Perl my/our/local is the most unusual scoping I know of[1]. But still lexical, except maybe local which is more like an alias? [1] http://www.perlmonks.org/?n
by marktangotango 12y ago
Perl my/our/local is the most unusual scoping I know of[1]. But still lexical, except maybe local which is more like an alias?
[1] http://www.perlmonks.org/?node_id=66677 http://www.perlmonks.org/?node_id=66677
- tripa 12y agomy is lexical, our is global, local is dynamic.
- tripa 12y agoI'll premptively add a bit of precision before a pedant comes along: my is lexical all the way; our defines a lexical binding over a global variable, and local defines a dynamic binding (of lexical extent) over a global.
- AnimalMuppet 12y agoAre you sure the pedant hasn't already arrived? ;-)