Tag Archives: file word counter

Use Perl’s regex to count the # of words in a file

In the below code I use Perl’s regex capabilites to count the # of words in a file. Notice I used “\s” in the regex expression to account for not only spaces but also tab and new line characters. In … Continue reading

Posted in Perl, Programming Languages | Tagged , , , , , , , , , , , , , , , , , | Leave a comment