in reply to perl OPEN function and zless
CPAN: Perl's killer app: PerlIO::via::gzip
I don't know how robust this is, but it worked on a simple test script I just tried myself.
use strict; use warnings; use autodie; use PerlIO::via::gzip; my $filename = 'example.txt.gz'; open my $fh, "<:via(gzip)", $filename; while ( <$fh> ) { print $. . $_; }
I think that's what you seem to be looking for. You could always just open a pipe from the shell instead though.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl OPEN function and zless
by legendx (Acolyte) on Jul 15, 2011 at 15:15 UTC |