Use the optional second argument for the Archive::Zip::addFile method:
use File::Basename; sub zipit(){ my ($zipName,$memberName)=@_; my $zip = Archive::Zip->new(); $zip->addFile( $memberName, basename($memberName) ); my $zipstatus = $zip->writeToFileNamed($zipName); }
In reply to Re: create zip without path struct
by idsfa
in thread create zip without path struct
by ecuguru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |