http://www.perlmonks.org?node_id=754727


in reply to Unzip with password?

As there is no appopriate perl module, I'm now doing it this way:
my $r; { open(ZIP,"-|","/usr/local/bin/unzip -P '·······' -p cache/$zipname $fname") || die "unzip failure"; local($/)=undef; $r=<ZIP>; close(ZIP); };
Of course you need to make sure that $zipname and $fname contain no evil characters.