in reply to Re^3: Is there a problem with using barewords as filehandles ?
in thread Is there a problem with using barewords as filehandles ?
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
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|