Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How do I print the values of a hash, sorted by the hash keys?

by abubacker (Pilgrim)
on Aug 13, 2009 at 13:04 UTC ( [id://788280]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://788280]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found