in reply to Re: Looking for a better way to get the number of lines in a file...
in thread Looking for a better way to get the number of lines in a file...
Reading in a full file into memory scares me. One day, someone will feed a 2GB file...
Having said that, @lines in your example already gives the number of elements in the array, where each element should contain a line. No need to count them.
f--k the world!!!!
/dev/world has reached maximal mount count, check forced.
|
|---|