in reply to Calculate the Sum of each customer data

Just in case... :)

for my $customer ( keys %$cust ) { my $total_usage = 0; ... ... for my $direction qw(OUT IN) { my $usage = $bill_data ->{$customer}->{$device}->{$por +t}->{$direction}; $total_usage += $usage; print CUST_OUT "$lastmonth_period $device $short_port +$direction$usage$/"; } ... print out $total_usage close(CUST_OUT); }

Replies are listed 'Best First'.
Re^2: Calculate the Sum of each customer data
by roborat (Novice) on Mar 07, 2010 at 13:34 UTC
    Hi Almut, thanks a lot for your help! This is exactly what I want. :)