I am researcher and I needed to check lisst of experimental sentences very quickly (definitely not homework! ;-) ) so in the end I went for the most basic of solutions and am just running
on all my files and scanning down the resulting word counts for outliers. Not very elegant!!perl -ne "{print tr/ //, $/}" FILE
I am afraid that as a complete novice (this being the first thing I have ever tried to do in perl) I wasn't clever enough to work out number of words on each line from your hints. If there is a more elegant solution I'd be grateful but in the meantime this will do! :)
Thanks again for trying to help, and I promise to persevere with the "proper" solution when time is less pressing!
mIn reply to Re^2: separate word count for each line of a file
by melb100
in thread separate word count for each line of a file
by melb100
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |