in reply to Zip script.
ActivePerl has HTML documentation on all the modules included. In Windows, you have Start->Programs->ActivePerl ...->Documentation#!/opt/ActivePerl-5.8/bin/perl use strict; use warnings; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $zip = Archive::Zip->new(); my @files = glob("*.txt"); foreach (@files) { my $member = $zip->addFile($_); die "Cannot add $_ to zip!" unless $member; } die 'write error' unless $zip->writeToFileNamed( 'zipfile.zip' ) == AZ +_OK;
|
---|