I want to use the Perl IO :: Uncompress :: AnyUncompress module, which is described here: http://perldoc.perl.org/IO/Uncompress/AnyUncompress.html .
However, this documentation seems to elude the fact that the compressed archive (.zip, .7z) contains a tree of compressed files. I would like to extract only one file from the archive, and not the full archive, for example:
my $archivename = 'archive.7z';
my $filetoextract = './bin/file.lib';
my $archive = new IO::Uncompress::AnyUncompress($archivename);
my $filecontent = $archive->extract($filetoextract);
However, the API does not seem to have such a extract()fonction, nor a function that would return a list of files contained in the archive.
Did I miss something?
source
share