use strict; use warnings; use Archive::Zip qw( :ERROR_CODES :CONSTANTS); my @files = <*>; my $arch = Archive::Zip->new(); my $file = 'test.zip'; $arch->addFile($_) for (@files); my $status = $arch->overwriteAs($file);