in reply to TIE:: to a compressed file ?

Tie::File streams the file off disk without slurping, but so would using a simple while(<>). On the other hand, the zipped chunk of data may contain newlines, and as far as I can tell you are not accounting for that. You can go to the trouble of zipping the "database files", but the savings will likely be marginal, and hardly justify the trouble you have to go through.

I don't think it's a good strategy, really. Is there any specific reason not to use an actual database? Or, barring that, for whatever reason, maybe something like Archive::Zip?

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^2: TIE:: to a compressed file ?
by Anonymous Monk on Jul 15, 2014 at 17:54 UTC
    I wanted to do something similar. The suggestion of IO::Zlib and Tie::File seemed like a nice idea, but IO::Zlib doesn't support seeking as required by Tie::File. Thanks, Arthur