Thnaks,
Your code semms to save members into DISK.
I found the next:
use Compress::Zlib;
my @files = $tar->list_files;
for my $file (@files) {
my $filedata = $tar->get_content($file);
my $dest = Compress::Zlib::memGunzip($filedata);
}
Regards,
H.T.
Hello,
Anyone knows the way to read ".gz" members in .tar file?
I can read plain text files by the next code.
But when the member is ".gz", I get uneadbale binay data.
use Archive::Tar;
my $file = shift;
my $tar = Archive::Tar->new($file, 1) or die "Error
Archive::Tar, :$!";
my @files = $tar->list_files;
for my $file (@files) {
my $filedata = $tar->get_content($file);
print "$file:\n", $filedata, "\n";
}
__END__
Hello,
you should unzip the gz files, with something like that:
(certainly no reference implementation)
use Archive::Zip;
sub unzip_file
{
my $file = shift;
my $zip = Archive::Zip->new($file);
my @members = $zip->memberNames();
#print Dumper \...@members;
#chdir($zip_directory);
foreach (@members)
{
$zip->extractMemberWithoutPaths($_ );
}
#chdir($start_dir);
}
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs