in reply to Reading .gz files.

use Archive::Extract; ### build an Archive::Extract object ### my $ae = Archive::Extract->new( archive => 'foo.tgz' ); ### extract to cwd() ### my $ok = $ae->extract; ### extract to /tmp ### my $ok = $ae->extract( to => '/tmp' ); ### what if something went wrong? my $ok = $ae->extract or die $ae->error; ...

Replies are listed 'Best First'.
Re^2: Reading .gz files.
by locked_user sundialsvc4 (Abbot) on Mar 23, 2011 at 20:40 UTC

    Perfecto...

    I neglected to say that modules like Compress::Zlib are low-level functionality, upon which other, higher-level CPAN modules have been constructed.   Search for the CPAN module which most closely matches what you are trying to achieve, and let them use the lower level routines on your behalf.