go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> Shouldn't the default scope be local?
No, the default isn't scoped at all¹ and the variables are globally accessible package vars. our is similar, but the (compile time) declaration is scoped. our was introduced comparatively late. Before that you needed to use vars to be strict. Try searching the archives, it's full of explanations and comparative examples.
Cheers Rolf ( addicted to the Perl Programming Language) ¹) some languages do, but Perl follows the mainstream tradition. In reply to Re: More Scope related questions.
by LanX
|
|