Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Adding files to ZIP files!

by InfiniteSilence (Deacon)
on Jan 13, 2012 at 19:07 UTC ( #947798=note: print w/ replies, xml ) Need Help??


in reply to Adding files to ZIP files!

I think this may be homework and the reason it comes up so often is that it is reassigned to a new class every year/semester.

There are all kinds of things missing from the code like a file handle is being returned from tempfile() but I don't see it getting closed anywhere...be honest, is this homework?

Celebrate Intellectual Diversity


Comment on Re: Adding files to ZIP files!
Download Code
Re^2: Adding files to ZIP files!
by Anonymous Monk on Jan 13, 2012 at 19:20 UTC
    Why instead of writing stupid answers you people don't point someone in to the right direction:
    You can start here;
    #!/usr/bin/perl -w use strict; use warnings; use Archive::Zip qw( :ERROR_CODES ); my $zipfile = "your_zip.zip"; my $zip = Archive::Zip->new(); unless ( $zip->read( "$zipfile" ) == AZ_OK ) { die 'read error'; } my @files = $zip->memberNames(); print $_, "\n" for @files;

      Because that stuff is in the perldoc. RTFM.

      Celebrate Intellectual Diversity

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2014-04-21 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls