in reply to function for ZIP file creation
The package IO::Zlib will compress files, and the package
Archive::Tar will add (or extract0 files into an archive of files.
Tar will compress files implicitly if IO::Zlib is already installed.
This solution is not exactly what you want since it does not take a
directory name as an argument; it will take a list of files as
one argument, or can add files incrementally.
In Section
Seekers of Perl Wisdom