【发布时间】:2013-03-20 13:06:51
【问题描述】:
当我在函数的参数中传递哈希表时,我会检索它。在我的情况下,function1 返回我的哈希表,然后我将我的哈希表作为参数传递给我的 function2,在我的 function2 中我将检索我的哈希表以进行浏览。
sub function1{
my code;
return %hash;
}
sub function2{
my %hash=$_[0];
my code browse my hash;
}
my %hash = function1();
function2(%hash);
我有以下错误:在散列分配中的奇数个元素
【问题讨论】:
标签: perl hash arguments subroutine