Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use strict ;
- use warnings ;
- use Archive::Zip qw( :ERROR_CODES );
- use IO::Uncompress::Unzip qw(unzip $UnzipError) ;
- my $input = "calendar.zip";
- my $zip = Archive::Zip->new();
- unless ( $zip->read( "$input" ) == AZ_OK ) {
- die 'read error';
- }
- my @members = $zip->memberNames();
- foreach (@members){
- unzip $input => $_
- or die "unzip failed: $UnzipError\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement