perl code to find sum and average of specific columns : i want to calculate the average over all itemsX (where X is a digit) for each row in perl using windows 
i have file in format
<p>id1 item1 cart1 id2 item2 cart2 id3 item3 cart3</p>
<p>0     11    34    1   22    44   2   44    44</p>
<p>1     44    44    55  66    34   45  55    33</p>
want to find sum of item blocks and there average
Any help in this regard
thanks in anticipation