unzip using Archive::Any of Perl
Archive::Any makes it easy to unzip a file using Perl only.
Start by installing Archive::Any with your favorite method of module installation. e.g.
cpanm Archive::Any
Then you can use this example program.
examples/unzip.pl
use strict; use warnings; use 5.010; use Archive::Any; my $filename = shift or die "Usage: $0 path_to.zip\n"; my $archive = Archive::Any->new($filename); if (not $archive) { say 'Not unzipped'; exit; } if ($archive->is_naughty) { die 'Naughty'; } for my $file ($archive->files) { say $file; } $archive->extract;
Published on 2021-03-25
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post