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.


use strict;
use warnings;
use 5.010;

use Archive::Any;

my $filename = shift or die "Usage: $0\n";

my $archive = Archive::Any->new($filename);
if (not $archive) {
    say 'Not unzipped';
if ($archive->is_naughty) {
    die 'Naughty';
for my $file ($archive->files) {
    say $file;