package NAMESPACE
Declares the compilation unit as being in the given namespace. You can refer to variables and filehandles in other packages by prefixing the identifier with the package name and a double colon: $Package::Variable
package声明了一个命名空间(变量和子程序), 你可以通过包名加双冒号加变量名的方式引用其他包的变量.
本文介绍了Perl中如何使用package声明命名空间,使变量和子程序组织得更为清晰。通过包名加上双冒号的方式可以方便地引用其他包内的变量。
330

被折叠的 条评论
为什么被折叠?



