V
Vimal
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
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