in reply to Re^5: Hashes of Hash in perl
in thread Perl Hash

My code:
while (chomp(@field = split (/\t/, <RPTFILE>))) { my $fulllookupKey = $field[1]."\t". $field[2]."\t". $field[3]."\t +".$field[4]."\t".$field[5]; my $RescatKey = $field[0]; my $RessubcatKey = $field[1]; my $MasterSrkey = $field[2]; if (exists($output{$RescatKey}{$RessubcatKey}{$fulllookupKey})) + { $output{$RescatKey}{$RessubcatKey}{$fulllookupKey}->[0] += $fie +ld[6]; $output{$RescatKey}{$RessubcatKey}{$fulllookupKey}->[1] += $fie +ld[7]; } else { $output{$RescatKey}{$RessubcatKey}{$fulllookupKey}->[0] = $fiel +d[6]; $output{$RescatKey}{$RessubcatKey}{$fulllookupKey}->[1] = $fiel +d[7]; } } for my $k1 (sort keys %output){ print "$k1\n"; for my $k2 ( sort keys %{ $output{$k1} } ) { print "\t$k2\n"; for my $k3 ( sort keys %{ $output{$k1}{$k2} } ) { my $Source = substr($k3,16,100); print "\t\t$Source $output{$k1}{$k2}{$k3}->[0]\t$output{$k1}{$k2} +{$k3}->[1]\n"; print "\t\t$Source\t TOTAL \t$output{$k1}{$k2}{$k3}->[1]\t$output +{$k1}{$k2}{$k3}->[0]\n"; } } }