localoperator). All further unqualified dynamic identifiers will be in this namespace. A package statement affects only dynamic variables--including those you've used
localon--but not lexical variables created with
my.Typically it would be the first declaration in a file to be included by the require or use operator. You can switch into a package in more than one place; it influences merely which symbol table is used by the compiler for the rest of that block. You can refer to variables and filehandles in other packages by prefixing the identifier with the package name and a double colon:
$Package::Variable. If the package name is null, the
mainpackage as assumed. That is,
$::sailis equivalent to
See Packages for more information about packages, modules, and classes. See the perlsub manpage for other scoping issues.