代码:
$PATTERN = 'specialname';
my $ArchiveX = Archive::Zip->new();
$ArchiveX->writeToFileNamed($PATTERN.".zip");
my $FileName = $File::Find::name;
$FileName =~ s/\//\\/g;
if ($FileName =~ /$PATTERN/) {
print "Addfile:".$FileName;
print "\n";
$ArchiveX->addFile($FileName);
}
错误:
无法在未定义的值上调用方法“addFile” 无法在未定义的值上调用方法“desiredCompressionLevel”