in reply to How do I print the values of a hash, sorted by the hash keys?
This is also one of the ways of achieving it
foreach $key ( sort { $a <=> $b } keys %hash){ $star = ($hash{$key}*15)/$max ; print " Kesy and values $key\t=>\t $hash{$key}:\t", "*"x$ +star, "\n "; }
Originally posted as a Categorized Answer.
|
|---|