Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: How to get fast random access to a large file?by gothic_mallard (Pilgrim) |
on Oct 29, 2004 at 12:53 UTC ( [id://403729]=note: print w/replies, xml ) | Need Help?? |
As I replied to fglock I can't change the files structure, only it's data. i.e. I can add/remove/change lines but I have no control over "how" they're represented. Each line is a fixed length record in itself, but each record type has a different structure. Say, a "print here" may be:
and a "new sheet" may be
and so on (those aren't real structures above but similar to the real thing). I was toying with the idea of creating index files, but that comes with the overhead of having to parse the original file first to create them (if I could do that quickly it wouldn't be so much of a problem ;-)). All code is untested unless otherwise stated.
In Section
Seekers of Perl Wisdom
|
|