我正在尝试从 perl 程序中的数组哈希打印数据。但它会打印一些垃圾值以及原始数据:
#!/usr/bin/perl
my %Quarter = (
June => ["06/03/2012", "06/10/2012", "06/17/2012", "06/24/2012"],
July => ["07/01/2012", "07/08/2012", "07/15/2012", "07/22/2012"],
August => ["08/05/2012", "08/12/2012", "08/19/2012", "08/26/2012"],
);
foreach my $month ( %Quarter ) {
print "$month\n";
}
输出:
July
ARRAY(0x9281af8)
June
ARRAY(0x9281bdc)
August
ARRAY(0x929ade8)
知道这个程序出了什么问题。
谢谢