in reply to Re^2: calculating linesin thread calculating lines
$wc += split; within the while loop will do it. That's another case of default arguments.
After Compline,Zaxo