I would really appreciate it if anyone could tell me how to count the number of words in a string. I can do it in unix via
wc -w file.text
but I can't do it on a $string in a perl script. I've been trying to find out how for the past 3 days. I'd be so grateful if anyone could help.
Thank you for listening.
wc -w file.text
but I can't do it on a $string in a perl script. I've been trying to find out how for the past 3 days. I'd be so grateful if anyone could help.
Thank you for listening.