In 5.8+ with PerlIO, you can use PerlIO::gzip.
If you're in an earlier perl, Compress::Zlib has what you need.use PerlIO::gzip; for (glob '*.gz') { open my $fh, '<:gzip', $_ or die $!; { local $_; while (<$fh>) { # do stuff } } close $fh or die $!; }
After Compline,
Zaxo
In reply to Re: using zcat for input?
by Zaxo
in thread using zcat for input?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |