# You use push so you must want an array push @{ $provisions{$person} }, $1; # You use hash of hash addressing so you must want a hash $total_bytes{$source}{$destination} += $bytes;