# I have a hash
my %my_hash;
# I have an array
@my_array = ["aa" , "bbb"];
# I store the array in my hash
$my_hash{"Kunjan"} = @my_array;
# But I can't print my array's element
print $my_hash{"Kunjan"}[0];
我是Perl新手。请帮帮我。如何访问存储在我的哈希Perl中的数组元素?
没有人提到它,但查看数据结构食谱。它有很多用于在各种嵌套结构中创建和访问数据的示例。您可以使用命令“perldoc perldsc”在您的机器上读取它,您也可以在http://perldoc.perl.org/perldsc.html – daotoad 2009-11-24 22:05:15
上找到它。另外,请参阅http://perlmonks.org/?node=引用+快速+引用 – ysth 2009-11-24 23:48:51