while ( my($cust,$balance) = each %balances ) { ... }