my %hash = $diary_data[0]; my @temp1 = keys %hash; print "%hash\n"; foreach $temp2 (@temp1) { print "$temp2\n"; print "$hash{$temp2}\n"; }