in reply to Archive Zip

You are writing to the zip file before you add the files to the zip object. Have a look at the AddTree example on CPAN. http://search.cpan.org/~adamk/Archive-Zip-1.30/lib/Archive/Zip.pm#Zip_Archive_Tree_operations