#!/bin/perl use strict; use warnings ; use Archive::Zip; my $zip_file = 'file.zip' ; my $zip = Archive::Zip-> new (); $zip ->addTree( 'c:/zip'); $zip ->writeToFileNamed( $zip_file ); if (-e $zip_file) { print "Archive created successfully!"; } else{ print "Error in archive creation!"; }