http://qs1969.pair.com?node_id=1214835


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.

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