I keep getting the message "Can't call method "addFile" on an undefined value at postprocCDR.pl" etc... at the exact line that the addFile method is called on $zipuse Archive::Zip qw(:ERROR_CODES :CONSTANTS); my $zip = Archive::Zip->new(); $fileToAdd = '12345678.pdf'; # ...etc... # ...etc... # ...etc... $fileWithPath = "$viewBillPath\\$fileToAdd"; $zip->addFile($fileWithPath) or die "couldnt add $viewBillPath\\$fileT +oAdd\n";
I have tested the path/filename that I am adding to the zip archive, and it is correct every time (i copy the path/filename that is output, paste it into Windows Explorer and it launches the correct application).
Does anyone know why I keep getting this "Can't call method addFile" error?
Your response is appreciated,
Brent.janitored by ybiC: Balanced <code> tags around codeblock, minor format tweaks for legibility
In reply to $zip->addFile not working. by heigold1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |