Sending again to another e-mail address:
It's no surprise you didn't find what you needed. The
documentation on that module is poor, though not
by a lack of trying by the author. He even created
a FAQ later because of the confusion, but it didn't
help me much either - I think due to version changes,
but I'm not sure. I'm really surprised by the lack
of examples on the web.
I did happen to stumble across a solution - posted
below. If you discover something cool with this
module, please share with me. If you have further
problems, feel free to contact me.
Mike Flannigan
ZIP:
use warnings;
use strict;
use File::Find;
use Archive::Zip;
my $dir = 'c:/Copy2';
my $zip = new Archive::Zip;
find sub {
( my $name = $_ ) =~ m/.*(?=\.\w{3})/;
return if -d;
return if /Io\.sys/;
return if /Msdos\.sys/;
return if /.*\.zip/i;
print "$name - $& \n";
$zip->addFile($File::Find::name);
$zip->writeToFileNamed("file.zip");
} => $dir;
__END__
UNZIP:
use strict;
use warnings;
use Archive::Zip qw(:ERROR_CODES);
my $dir = 'C:/Copy2';
my $zipfile = 'test.zip';
chdir $dir or die "Cannot chdir $dir:$!\n";
my $zip = Archive::Zip->new();
die "Error reading $zipfile:$!" unless $zip->read( "$dir/$zipfile" ) == AZ_OK;
$zip->extractMember($_) for $zip->members;
__END__
> Subject: RE: Using compression on Win32 systems
> Date: Thu, 5 Feb 2004 11:35:27 -0500
> From: "Ned Cunningham" <[EMAIL PROTECTED]>
> To: "Paul Kraus" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>
> Yes,
> I have looked and googled and searched aspn.
>
> Have not been able to find an example.
>
> Ned Cunningham
> POS Systems Development
> Monro Muffler Brake
> 200 Holleder Parkway
> Rochester, NY 14615
> (585) 647-6400 ext. 310
> [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>