perl -ne '$count++ unless /\S/; print "$count\n" if eof' <filename [download]
In reply to Re: perl by Fastolfe in thread perl by Anonymous Monk