in reply to using zcat for input?

In 5.8+ with PerlIO, you can use PerlIO::gzip.

use PerlIO::gzip; for (glob '*.gz') { open my $fh, '<:gzip', $_ or die $!; { local $_; while (<$fh>) { # do stuff } } close $fh or die $!; }
If you're in an earlier perl, Compress::Zlib has what you need.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: using zcat for input?
by Schuk (Pilgrim) on Dec 10, 2004 at 13:07 UTC
    I just tested the speed of these three posibilites:

    Compress::Zlib took 3:55 min
    PerlIO::gzip took 2:51 min
    and Zcat took 2:30 min

    as I am parsing serveral Gigabyte gzip logs per day Ill stick with zcat.

    Cheers
    Schuk