I am still quite novice at Perl but I need to attack this script fast.

Here is the code:

#!/usr/bin/perl $| = 1; use Archive::Zip qw( :CONSTANTS ); $sandbox = "/tmp/sandbox"; opendir(D,"$sandbox") or warn("Could not open $sandbox\n");; @FILES = grep(/([A-Z]|[a-z]|[0-9])\.EXE/,readdir(D)) or die("Could not + read from $sandbox\n");; close(D); chdir("$sandbox"); for ( @FILES ) { $file = $_ ; my $unzip = Archive::Zip->new(); print("File: $file\n"); print("Attempting to deflate $file: "); $unzip->extract("$sandbox/$file") or warn("OOPS! Could not deflate + $file - $!\n") or print("done\n"); } 0
When run, I get the following:

gvc@hopper> perl -c unzip.pl unzip.pl syntax OK gvc@hopper> perl unzip.pl File: USEOB096.EXE Attempting to deflate USEOB096.EXE: Can't locate object method "extrac +t" via package "Archive::Zip::Archive" at unzip.pl line 24. gvc@hopper>
Hmmm...This is not the error I was getting a week ago when I ran this but this is a good starter. Why can't it find this module?

I will go on from this once I have resolved this issue.
Thanks for the assistance.

Edit 2001-03-28 by tye to replace <pre> with <code>


In reply to extracting self-extracting pkzipped files with Archive::Zip by snafu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.