Hi, I'd like to write a program, which can search the number of repeated words in text.
For example, to check how many times was every word repeated in text; or to check which words were repeated more than 5 times.
I heard there is some function 'grep', but I'm not sure how does it work.
@words = split(/\S/,$text);
foreach (@words) {
...
and check each word and make it as some variable, and check with all others - seems be too LONG and seems to EAT to many resources.
Anyone knows of an easier way?
For example, to check how many times was every word repeated in text; or to check which words were repeated more than 5 times.
I heard there is some function 'grep', but I'm not sure how does it work.
@words = split(/\S/,$text);
foreach (@words) {
...
and check each word and make it as some variable, and check with all others - seems be too LONG and seems to EAT to many resources.
Anyone knows of an easier way?