创建一个anonymous array
$ref=['ATGC','GATC','ATGCG']; #[]创建的就是匿名数组,$ref为引用,所有引用都是$开头
print "Here is what in the reference\n";
print "$ref\n";
print "@$ref\n";
print "@$ref[1]\n";
print "$ref->[1]\n";
打印结果
Here is what in the reference
ARRAY(0x112c570)
ATGC GATC ATGCG
GATC
GATC
网友评论