use IO::Zlib; my $fh = new IO::Zlib; $fh->open('zipfile.gz','rb'); while(<$fh>) { print } $fh->close #### chomp @cdr_list; foreach my $tarzip (@cdr_list) { my $tar = Archive::Tar->new($tarzip); foreach my $file ($tar->list_files) { print $tar->get_content($file) } }