The simple and efficient mmap version is both efficient and simple:
use File::Map q(map_file); map_file $_, shift, '<'; print tr/\n// + /[^\n]\z/;
In reply to Re: Count number of lines in a text file
by Anonymous Monk
in thread Count number of lines in a text file
by Scott7477
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |