Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Adding files to ZIP files!

by InfiniteSilence (Curate)
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 honest, is this homework?

Celebrate Intellectual Diversity

Replies are listed 'Best First'.
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 = ""; 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://947798]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-08-16 17:59 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (272 votes). Check out past polls.