in reply to Re: word count
in thread word count
47 bytes, counting the shebang and two LFs; 26 bytes for the one-line script by itself. And it gives with the correct answer, too (48 "words" for the input text in question).#!/usr/bin/perl -ln $t+=@a=/\w+/g;END{print$t}
|
|---|