in reply to FTP folders

Check CPAN module Archive::Zip and other related modules.

Another way to get the anwser for this question, is to go to www.cpan.org, do a module search by key word "zip". It will give you the answer you want.

Once you get to the document of the module, you will see a big FAQ list, don't bother it for now. To make it simple, and get yourself started right the way, go straight to those two sections: "how to add a directory/tree to a zip" and "how to extract a directory/tree".