in reply to Backwards searching

You might want to check out the Mmap module on CPAN. It allows you to map a file into a Perl variable. As I understand it (and I've not used it) BSD & Linux allow a file to be mapped into memory. As you access various portions of the file, it basically page faults the corresponding block from the file into your user memory space. It seems that if you only access the front and end of a file, it will only load those parts, and not the remaining middle portion.

I don't know what the speed impact of using it would be, but it might be a possible way for manipulating your data.

I had thought this facility might be usable under Perl, so Thanks! to chromatic for telling me where the module was.

--Chris

Replies are listed 'Best First'.
RE: RE: Backwards searching
by husker (Chaplain) on Jun 15, 2000 at 01:03 UTC
    HP-UX supports memory mapped files as well, although how it works with the Perl method of doing so is an exercise for the reader. (I'm not wizardly enough to try it myself right now..)