Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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

Comment on Re: Adding files to ZIP files!
Download Code
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-11-28 12:48 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (741 votes), past polls