这种数组没有明确的类型,被称为匿名数组(anonymous array),既不能作为子程序的参数,也无法同其它数组混用—-即使声明一样。通常情况下应避免出现这种情况
基于48个网页-相关网页
Learn to understand the Perl notation for anonymous array references and dereferencing array elements.
学习理解匿名数组引用和解除数组元素引用的Perl符号。
The line of perl says, "Read all input lines into an anonymous array , reverse the order of the elements, and print the new array."
包含perl的那行命令表示“将所有的输入行读入一个匿名数组(),颠倒元素的顺序,并打印这个新的数组”。
Where there is more than one instance of the type to output -- in this case, where you have two cats but one dog -- you need to collect the hashes as an anonymous array of anonymous hashes.
在需要输出一个类型的多个实例的情况下 —— 在这个示例中,有两只猫和一只狗 —— 需要以匿名散列的匿名数组的形式收集散列。
应用推荐