Can you post your loop structure as well? From you indenting, I assume that my $zip = Archive::Zip->new(); is before the loop but $zip->writeToFileNamed() is in it? I didn't see anything in the Archive::Zip docs to support this idea, but maybe just move the $zip->writeToFileNamed() to after the for loop (seems a waste of write's to do it each time anyways)?