Keeping your own buffer also has the advantage of working on something that's not seekable (e.g. a network socket, or a pipe from another program).
In reply to Re^2: How do I backtrack while reading a file line-by-line?
by Fletch
in thread How do I backtrack while reading a file line-by-line?
by mdunnbass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |