in reply to Re: How To Count Lines In File?
in thread How To Count Lines In File?

You slurp the file though - and you still pay the read-line-by-line penalty. Here's one that slurps as well but counts using tr.
$ perl -lp0777e'$_=tr/\n//' foo

Makeshifts last the longest.