Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

RE: Word Counter

by merlyn (Sage)
on May 09, 2000 at 16:55 UTC ( [id://10746]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -na0777e '%a = map {$_, ++$a{$_}} @F; print join("\n", (sort { $a
    +{$b} <=> $a{$a} } keys %a)[0..9]), "\n"' <filename>
    
  2. or download this
    perl -ne '$a{$_}++ for split; END { @a = sort { $a{$b} <=> $a{$a} } ke
    +ys %a; print "$_\n" for @a[0..9]; }' <filename>
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-03-29 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found