Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); use Data::Dumper; my $zipFile = "myzip.zip"; my $archiveDir = '/fileDirectory' ; my $zip = Archive::Zip->new(); my $status = $zip->read("$archiveDir/$zipFile"); my @members = $zip->memberNames(); die "Read of $zip failed\n" if $status != AZ_OK; foreach my $member (@members) { $zip->extractMember($member, "/zips/$member"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unzipping and extracting file only with Archive::Zip
by Mr. Muskrat (Canon) on Nov 28, 2017 at 19:18 UTC | |
by Anonymous Monk on Nov 28, 2017 at 19:25 UTC | |
by Mr. Muskrat (Canon) on Nov 28, 2017 at 19:46 UTC | |
by Anonymous Monk on Nov 28, 2017 at 20:01 UTC |