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); }
In reply to Re: Calculate the Sum of each customer data
by almut
in thread Calculate the Sum of each customer data
by roborat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |