in reply to adding values of element
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: adding values of element
by new2perl2 (Initiate) on Jan 21, 2015 at 23:09 UTC | |
by johngg (Canon) on Jan 21, 2015 at 23:58 UTC | |
by Anonymous Monk on Jan 22, 2015 at 00:35 UTC | |
by new2perl2 (Initiate) on Jan 22, 2015 at 00:16 UTC | |
by Anonymous Monk on Jan 22, 2015 at 00:42 UTC |