Here is the code
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
my $zip = Archive::Zip->new();
my $zip_file_name = 'scraper.zip';
$zip->read( $zip_file_name );
print "Number of files in the zip file: ".$zip->numberOfMembers()."\n";
print "List of files:\n";
my @members = $zip->memberNames();
#now print the name of the files
foreach (@members)
{
print $_, "\n";
}
For details, please check http://search.cpan.org/~adamk/Archive-Zip-1.23/lib/Archive/Zip.pm
No comments:
Post a Comment