Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> lexicals declared at file-scope are global variables
No, it's a different quality if a variable can be accessed and altered in a different file from another author. Furthermore putting a file scoped lexical behind the last sub would protect it from becoming closed over. Package vars are accessible nonetheless, no matter where you define them. perlglossary even makes a distinction between package vars and special vars. In Perl, only certain special variables are truly global—most variables (and all subroutines) exist only in the current package.
Cheers Rolf In reply to Re^4: Is there a problem with using barewords as filehandles ?
by LanX
|
|