You might want to try Data::Hash::Totals. As the author, Andy Lester said, in the synopsis, "This module is so butt simple, but I'm tired of redoing this code over and over again":
my %fave_stooge_votes = ( Moe => 31, Larry => 15, Curly => 97, Shemp => 3, ); print as_table( \%fave_stooge_votes ); prints the following: 97 Curly 31 Moe 15 Larry 3 Shemp
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re: Add and print the values in a hash
by xdg
in thread Add and print the values in a hash
by kulls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |