#!/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 #### 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 "extract" via package "Archive::Zip::Archive" at unzip.pl line 24. gvc@hopper>