Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Find most frequently used word in text file.

by roboticus (Canon)
on Dec 19, 2013 at 19:44 UTC ( #1067874=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($bestVal, $bestKey) = (-1);
    foreach my $key (@keys) {
    ...
        }
    }
    print "The most frequent word in $ARGV[0] is $bestKey, which was seen 
    +$bestVal times.\n";
    
  2. or download this
    while (my $line = <FILE>) {
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-12-21 18:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls