Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Output data to a table or horizontal bar chart

by hippo (Bishop)
on May 18, 2018 at 10:55 UTC ( [id://1214835]=note: print w/replies, xml ) Need Help??


in reply to Re^2: OUTPUT Data to a table or horizontal bar chart
in thread OUTPUT Data to a table or horizontal bar chart

The "first column" is the key and the "second column" is the value. See the FAQ How do I sort a hash (optionally by value instead of key)? which discusses sorting by value as you now require here.

  • Comment on Re^3: Output data to a table or horizontal bar chart

Replies are listed 'Best First'.
Re^4: Output data to a table or horizontal bar chart
by theravadamonk (Scribe) on May 18, 2018 at 11:41 UTC

    I changed below code

    for my $word (sort keys %count) {
    to
    for my $word (sort { $count{$b} <=> $count{$a} } keys %count) {
    It seems to work. Anyway, Your Ideas r welcome

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-18 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found