# this is perlzip.pl use strict; use Archive::Zip; my @files_to_get = ( { files => "perlzip.pl" }, # in current directory { files => "\\alans\\dummy.txt" }, # in another dir ); my $zip = Archive::Zip->new(); # new zip object for packaging foreach my $href ( @files_to_get ) { my $file = $href->{"files"}; print( " adding $file\n" ); $zip->addFile( $file ); } $zip->writeToFileNamed( "MyZip.zip" ); exit;