dorianwinterfeld has asked for the wisdom of the Perl Monks concerning the following question:
thanks for your help - Dorianuse CGI qw/:standard/; use CGI::Carp (fatalsToBrowser); use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); use lib '..'; require 'globals.plx'; require './config.plx'; print header; open FH,$vsc_log; my @files = <FH>; close FH; print qq(change dir to $server_root),br; chdir "$server_root" or "Can't cd to $server_root: $!"; my $zip = Archive::Zip->new(); foreach my $file (@files){ $file =~ s@d:/online/@@; $file =~ s@/@\\@g; print "add $file",br; $zip->addFile("$file"); } print qq(write $vsc_zip),br; die 'write error' unless $zip->writeToFileNamed( $vsc_zip ) == AZ_OK;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: archive-zip problem
by fglock (Vicar) on Mar 28, 2005 at 13:34 UTC | |
by dorianwinterfeld (Acolyte) on Mar 28, 2005 at 18:48 UTC | |
|
Re: archive-zip problem
by derby (Abbot) on Mar 28, 2005 at 13:41 UTC |