legendx has asked for the wisdom of the Perl Monks concerning the following question:
Is is possible to use the zless utility and Perl's open function to read a gzipped file?
I tried using open and piping to zless but that did not work. Ultimately, I would like to read a gzipped file line by line with a while loop without unzipping it such as:
open(FILE, '<', $filename) #somehow using zless or other? while <FILE> { ...do action on each line... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl OPEN function and zless
by davido (Cardinal) on Jul 14, 2011 at 21:17 UTC | |
by legendx (Acolyte) on Jul 15, 2011 at 15:15 UTC | |
|
Re: perl OPEN function and zless
by betterworld (Curate) on Jul 14, 2011 at 21:02 UTC | |
by legendx (Acolyte) on Jul 15, 2011 at 15:16 UTC |