in reply to Re^5: Archive::ZIP - Zip selection of files
in thread Archive::ZIP - Zip selection of files
does exactly what I want. I have all the file names and paths in the array. And with:@files = $zip->memberNames();
I reduce the information before it's written to an archive. I want to select before I write and have the names, that's why comparing is not my goal. It's curious why@file = splice @files, 1, 50;
doesn't do the job. Any explanation to this?foreach $line (@file) { $fileend = (split(/\./,"$line"))[-1]; if (($fileend eq "jpg") || ($fileend eq "txt")) { $zip->addFile("$line"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Archive::ZIP - Zip selection of files
by Corion (Patriarch) on Apr 10, 2015 at 10:16 UTC | |
by gmaniac (Initiate) on Apr 10, 2015 at 10:32 UTC | |
by Corion (Patriarch) on Apr 10, 2015 at 10:35 UTC | |
by gmaniac (Initiate) on Apr 10, 2015 at 12:37 UTC |