laziness, impatience, and hubris | |
PerlMonks |
Re^2: Displaying/buffering huge text filesby scooper (Novice) |
on Feb 24, 2005 at 23:43 UTC ( [id://434313]=note: print w/replies, xml ) | Need Help?? |
sfink: You can handle a lot of data that way -- but just be
sure you don't hit the nasty cases, such as a file containing
only newlines. a file containing *only* newlines is not a nasty case and requires no indexing at all. If you can figure out before you read it that the file contains only newlines, you change your "figure out the seek offset" subroutine so that to get to line 120000 it seeks to byte 120000. It doesn't get any easier!
In Section
Seekers of Perl Wisdom
|
|