[PLUG] Paragraph Counting Script

Rich Shepard rshepard at appl-ecosys.com
Mon Jul 13 22:53:14 UTC 2009


On Mon, 13 Jul 2009, Eric Wilhelm wrote:

>  perl -e 'local $/ = "\n\n"; my @p = <>; print scalar(@p), "\n";'

Eric,

   I _knew_ there was a perl solution. :-) After all, it is for text
processing. Unfortunatly, I don't know perl, so I thank you.

> You may want to check for blank paragraphs or allow for trailing, ending,
> or more than two newlines.

   I'm cutting and pasting from web pages and cleaning the text as I go.
There won't be blanks or more than two newlines.

Thanks!

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863



More information about the PLUG mailing list