#!/usr/bin/perl -w use strict; use Archive::Zip; use IO::All; my $io = io("."); my $zip = Archive::Zip->new(); my $t1 = time(); while ( $_ = $io->next ) { $zip->addFile("$_") if $_ =~/\.txt$/; } $zip->writeToFileNamed('ZipFile.zip'); print "\n", time() - $t1, "\n";