Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Zip script.

by archfool (Monk)
on Jun 20, 2007 at 20:17 UTC ( [id://622385]=note: print w/replies, xml ) Need Help??


in reply to Zip script.

This script was fat-fingered in (i.e. untested), but here's the process. Archive::Zip comes with ActiveState Perl.
#!/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;
ActivePerl has HTML documentation on all the modules included. In Windows, you have Start->Programs->ActivePerl ...->Documentation

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://622385]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-19 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found