Perl的一个有关问题
Perl的一个问题Perl codeuse strictmy %hash (key data)print(ref(\*hash),ref(\*hash),\n)
Perl的一个问题
Perl codeuse strict;my %hash = (key => "data");print('ref(\*hash)=',ref(\*hash),"\n");
这里面的*是什么意思?输出的GLOB是什么意思?
[解决办法]typeglob
只是指向一片符号的一个表示。
建议你看一下perl的 typeglob
[解决办法]因为ref返回参数所引用的类型,所得结果表示*hash的类型为GLOB。其实,*hash表示包含所有名为hash的变量的引用的结构,这种结构就是GLOB类型,GLOB是perl的一种类型。