mdog has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way in perl (natively) to be able to read / grep the content out of a compressed text file without first decompressing the compressed file into text file and then reading it to do some sort of grep against it?
Basically, in perl, can you take the uncompressing stream of data and pass it into grep?
Background: I say natively because I am on windows and although I do have gunzip.exe and grep.exe (and perl grep), pipes don't work.
I need to leave the file compressed when I am done so if I didn't have to recompress the file, that would save time (thus the stream of data reference). Of course, I could copy the compressed file, uncompress that, and delete both when done but that seems half-assed.
The compressed file is a gzipped text file (the -9 compression is great) but I could store it as .zip or anything else that will shrink it down significantly.
Many thanks,
mdog
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting Text From A Compressed File
by Zaxo (Archbishop) on Apr 01, 2005 at 01:34 UTC | |
|
Re: Getting Text From A Compressed File
by moot (Chaplain) on Apr 01, 2005 at 01:01 UTC | |
|
Re: Getting Text From A Compressed File
by polettix (Vicar) on Apr 01, 2005 at 16:55 UTC | |
by mdog (Pilgrim) on Apr 01, 2005 at 18:35 UTC |