Open the file binary mode. Read it a modest size block at a time (say 8K) and concatenate the new block onto the end of a buffer. Use index to find the line ends and pull the lines out of the buffer using substr. Top up the buffer when there are no more line ends.
In reply to Re: Thrashing on very large lines
by GrandFather
in thread Thrashing on very large lines
by chr1so
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |