http://www.perlmonks.org?node_id=168579


in reply to Word Count Script+

Nifty...
though if it doesn't find a "." "?" or "!" in the input file, you'll get a warning:
Use of uninitialized value in addition (+) at wc.pl line 95.

~monk d4vis
#!/usr/bin/fnord