I've locate the following logit to retrieve data on the contents of a zip file:
Open ZIP and MPG file to get size.
my $zip = Archive::Zip->new($ARGV);
foreach my $member ($zip->members())
printf("%8d %8d %s %s\n",
I need to obtain the date, size, and any other meta data about the zip file and not just its contents. Can someone provide feedback on a module that will enable me to complete this task?
I am familiar with the stat function, which I use for some file size checks; however, due to the number of systems involved in creating the zip and mpg files, I was under the impression that I should be able to read the zip file header information that will tell me hard facts about the file I am reading.
I've learned that the following logic only supplies specifics about the files contained in the zip file:
Here's the problem: all the information in a zip file relates to files within the zip file. But don't take my word for it, read the zip file specs.
So, no, Perl can't look in the zip file to find out who modified it because that info simply isn't there. If you're using some utility to create your Zip files and they store nonstandard information, your best bet would be to find their modified specs and subclass Archive::Zip yourself. But there's no reason to store that information because the OS stores it in the normal file system.
BTW, if stat doesn't get what you need, there are platform specific modules that do. You'd probably find them on search.cpan.org.