4.4.17.1 The name of the file, with optional relative path.
The path stored MUST not contain a drive or
device letter, or a leading slash. All slashes
MUST be forward slashes '/' as opposed to
backwards slashes '\' for compatibility with Amiga
and UNIX file systems etc. If input came from standard
input, there is no file name field.
####
NOTE that you should not (generally) use absolute path
names in zip member names, as this will cause problems
with some zip tools as well as introduce a security
hole and make the zip harder to use.
####
foreach my $href ( @files_to_get ) {
my $file = $href->{"files"};
print( " adding $file\n" );
my $name = $file;
$name =~ s/^[A-Z]://; # remove drive
$name =~ s#^[/\\]+##; # remove leading path delimiter
$zip->addFile( $file, $name );
}