You already have been introduced to the concept of reading from pipes. Maybe try
my $cmd = sprintf 'gzip -cd "%s"', $file; open my $fh, $cmd or die "Couldn't read [$cmd]: $!";
In reply to Re^7: Reading zipped files (.gz)
by Corion
in thread Reading zipped files (.gz)
by ravi45722
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |