Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Perhaps I was unclear, one of the things you have to do in order to count the number of occurrences of each word in a given text is to create a list of the unique words present, the other thing you have to do is associate a count with each of these words.
If you can think of a data structure more suited to this purpose than an associative array or hash, I'd be very interested.
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
In reply to Re^3: compute the occurrence of words
by Utilitarian
|
|