Monday, 17 February 2014

Counting no words in a file (Perl)

open("FILE","sam");
while($line=<FILE>)
{

print $se++."\n" while($line=~m/[\s]+/g);
}


No comments:

Post a Comment