Perl - empty zipped folders in file

Hi, I use Perl and Archive::Zip to compress my folders.

Some have sub folders in and that works fine.

However, included in the zipped file is a folder with blank folders in - these relate to pathway to the one I have zipped. Make sense?

How do I prevent the empties?
They take up no space and don’t really present a problem, just wondered how to not have them.

I use

use Archive::Zip;
use Archive::Zip::Tree;
my $zip = Archive::Zip->new();

Hope somebody can shed some light on this.

(I will also have another question about zippiing after this one.)

Solved. It works okay on live server, the paths problem only came up on a local testbed server.