<?xml version="1.0" encoding="windows-1252"?>
<node id="1005176" title="Re^2: separate word count for each line of a file" created="2012-11-22 14:24:35" updated="2012-11-22 14:24:35">
<type id="11">
note</type>
<author id="1004976">
melb100</author>
<data>
<field name="doctext">
Thank you for your tips monks,

&lt;p&gt;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

&lt;code&gt;
perl -ne "{print tr/ //, $/}" FILE
&lt;/code&gt; 

on all my files and scanning down the resulting word counts for outliers. Not very elegant!!&lt;/p&gt;

&lt;p&gt;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! :) &lt;/p&gt;

&lt;p&gt;Thanks again for trying to help, and I promise to persevere with the "proper" solution when time is less pressing! &lt;/p&gt;

m</field>
<field name="root_node">
1004978</field>
<field name="parent_node">
1005049</field>
</data>
</node>
