Vimal
9/25/2006 2:23:00 PM
Hi
Say I have a Hash, and an instance called wordcount, that maps strings
to a number count, that counts the occurance of the word.
I do
count = Hash.new
count[word]++ if count[word]
count[word]=1 unless count[word]
everytime! Is there a simple way to do it?
Thanks :)
Vimal