Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Top five words by occurrence

by ikegami (Pope)
on Jul 18, 2005 at 16:45 UTC ( #475807=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $top = 5;
    foreach $w (sort { $count{$b} <=> $count{$a} } keys %count) {
    ...
    
       print "$count{$w} $w\n";
    }
    
  2. or download this
    my $top = 5;
    foreach $w (
    ...
    ) {
       print "$count{$w} $w\n";
    }
    
  3. or download this
    my $top = 5;
    my $last_count = -1;
    ...
    
       print "$count{$w} $w\n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2020-02-22 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (99 votes). Check out past polls.

    Notices?