Here is the code:
When run, I get the following:#!/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
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?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>
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |