To have what you want (i.e. one amount for each customer), the bottom line is to use a hash. Since you already have a hash, we could say that you are done... unless your current hash is too complicated for what you want to do. In this case, you need to make a second less complex hash, for example using the code provided earlier by
AppleFritter. At the end you would get a simple hash looking like this:
0 HASH(0x6005e8d88)
'cust1' => 10
'cust2' => 20
'cust3' => 30
I must say that I am not quite sure to understand what your current data structure really is (and will therefore not supply additional code right now), it would be good if you could explain further (perhaps using the output produced by Data::Dumper on your root hash).