Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks in advance,#!/usr/bin/perl use warnings; use strict; use Archive::Zip qw( :ERROR_CODES :CONSTANTS); my $date = "text files"; my $zip = Archive::Zip->new(); opendir DIR, $date; my @Filelist = grep { /.txt$/ } readdir DIR; foreach my $file(@Filelist){ my $member = $zip->addFile("$date\\$file"); die 'Error writing file' if $zip->writeToFileNamed("$date.zip" +) != AZ_OK; } print "Finished\n"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Archive::Zip performance question
by Albannach (Monsignor) on Feb 16, 2005 at 16:24 UTC | |
by holli (Abbot) on Feb 16, 2005 at 17:08 UTC | |
by poqui (Deacon) on Feb 16, 2005 at 20:57 UTC | |
by cowboy (Friar) on Feb 16, 2005 at 17:43 UTC | |
|
Re: Archive::Zip performance question
by NiJo (Friar) on Feb 16, 2005 at 20:17 UTC | |
|
Re: Archive::Zip performance question
by Miguel (Friar) on Feb 16, 2005 at 22:56 UTC | |
|
Re: Archive::Zip performance question
by Courage (Parson) on Feb 16, 2005 at 18:16 UTC |