If you have PerlIO enabled (default in 5.8+), you can use PerlIO::gzip:
use PerlIO::gzip; open my $fh, '<:gzip', '/path/to/file.gz' or die $!; while (<$fh>) { # do stuff } close $fh or die $!;
Update: Typo fixed, thanks, Roy Johnson++.
After Compline,
Zaxo
In reply to Re: Getting Text From A Compressed File
by Zaxo
in thread Getting Text From A Compressed File
by mdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |