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... }
In reply to perl OPEN function and zless by legendx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |