http://www.perlmonks.org?node_id=875615


in reply to Re^2: Parse a tar.gz file without unzipping and uncompressing unzipping?
in thread Parse a tar.gz file without unzipping and uncompressing unzipping?

my $pipecmd = "zcat $file | tar  -O -xf -"; # -O, extract files to standard output

Your tar may even have support for uncompressing built in, look for the tar option "-Z" for uncompress and "-z" for unzip.