Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/perl/bin/perl -w use strict; use warnings; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); use File::Find; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); # @chunks could be: file1.txt file2.txt file3.txt or more files or jus +t one my $htdocs_out; open $htdocs_out, '>', "$arch_path/$dir_archive_name/$outname" + or die $!; foreach my $chunk_file(@chunks){ my $chunk_zip = Archive::Zip->new(); my $chunk_zipped; $chunk_zipped = $chunk_zip->addFile( $chunk_file ); print $htdocs_out $chunk_zipped; } close $htdocs_out or die $!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Zipping Files
by samtregar (Abbot) on Jun 26, 2006 at 20:17 UTC | |
by Anonymous Monk on Jun 26, 2006 at 21:44 UTC | |
by samtregar (Abbot) on Jun 26, 2006 at 23:34 UTC | |
|
Re: Zipping Files
by radiantmatrix (Parson) on Jun 27, 2006 at 17:14 UTC | |
by pKai (Priest) on Jun 27, 2006 at 22:15 UTC |