Here is a ruby challenge for all you computer science lovers out there,
lets see how many ways we can solve this problem:

create a word frequency generator; that is, a program that takes in a
text file and generates a list of words and counts (you know, pairs of
things). Lets say you have a text file.

If the text file contained this sentence, the output of your program
would look something like this:

1 contained
1 file
1 if
1 like
1 look
1 of
1 output
1 program
1 sentence
1 something
1 text
1 would
1 your
2 the
2 this

Consider a "word" to be any space-delimited token. How would you also do
this with punctuation included?

-- 
Posted via http://www.ruby-forum.com/.