$ref={'ATGC'=>1,'GATC'=>2,'ATGCG'=>3}; #匿名hash用{}表示,引用还是$
print "Here is what in the reference\n";
print "$ref\n";
@a=keys %$ref;
@b=values %$ref;
print "@a\n";
print "@b\n";
打印结果
Here is what in the reference
HASH(0x6cc570)
ATGCG ATGC GATC
3 1 2
网友评论