What is your preferred method for reading the contents of zipped directories using Perl?
There are several modules in CPAN for working with various archive formats (zip, tar, etc.), the one that you probably after that is Archive ::. Zip
Archive :: Index
require Archive::Zip; my $zip = Archive::Zip->new($somefile); for($zip->memberNames()) { print "$_\n"; }
If you want the contents of the .tar.gz archive
open(DIR_LISTING, "gzip -dc concert25.tgz | tar -tf -|") || die; while (<DIR_LISTING>) { print; } close (DIR_LISTING);
Source: https://habr.com/ru/post/1697524/More articles:positioning of three divs with css - htmlPHP log / graph runtime - phpfork () as an argument - cHow to find out if the maximum file size was reached when using a stream? - c ++Best way to handle multilingual support? - c #Finalizer is running while its object is still in use - garbage-collectionDifferences between Ruby Virtual Machines - ruby | fooobar.comHow to create a jar file that includes xml and html files? - jarTrying to get a Windows service to run an executable on a shared drive - executableJavascript: trigger action on function exit - javascriptAll Articles