my $name = 'bob'; my $amount = 110; $sum{ $name } += $amount; ## sum of bob is increasing $amount = 100; $sum{ $name } += $amount; ## sum of bob is increasing $amount = 10; $sum{ $name } += $amount; ## sum of bob is increasing $amount = -100; $sum{ $name } += $amount; ## sum of bob is decreasing
In reply to Re: adding values of element
by Anonymous Monk
in thread adding values of element
by new2perl2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |