but I only obtain a void zip :(cat /home/user/d/file_list.txt /home/user/a/a.txt /home/user/b/b.txt /home/user/c/c.txt #! /usr/bin/perl use strict; use warnings; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $zip = Archive::Zip->new(); open (FILE_LIST, '/home/user/d/file_list.txt'); while (<FILE_LIST>) { chomp; my $member = $zip->addFile($_); print "Add error" unless ($member); } close FILE_LIST; unless ($zip->writeToFileNamed('/home/user/d/backup.zip') == AZ_OK) { die "write error";}
In reply to Problem with creating a zip: void file by afrika
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |