Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: Displaying/buffering huge text files

by scooper (Novice)
on Feb 24, 2005 at 23:43 UTC ( #434313=note: print w/ replies, xml ) Need Help??

in reply to Re: Displaying/buffering huge text files
in thread Displaying/buffering huge text files

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!

Comment on Re^2: Displaying/buffering huge text files

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://434313]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-11-25 10:32 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (673 votes), past polls