#! c:\perl\bin\perl use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); if (scalar(@ARGV) < 2){die "Zip.pl\nAuthor:Include\nUsage: zip.pl \n";}; my $opt = shift(@ARGV); my $ofile = shift(@ARGV); # extract a zip file if($opt=~/x/i){ print "Zip.pl\nAuthor:Include\n"; print "Extracting $ofile...\n"; $zip = Archive::Zip->new(); die 'Error reading zip file.' if $zip->read( $ofile ) != AZ_OK; my @members = $zip->members(); foreach $element(@members) { print "$element\n"; $zip->extractMember($element); } print "Done!\n"; }