in reply to How To Count Lines In File?
sysread of a fixed block (adjusting the 4096 argument to
match the blocksize used by your OS provides an additional
optimization, BTW) is more efficient than asking perl to do that in the background and then scan until \n into sub-
buffers returning them one at a time. tr just scans once straight thru the whole buffer, and returns the count as a side effect.