heigold1 has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: $zip->addFile not working.
by arden (Curate) on Jun 04, 2004 at 22:38 UTC | |
by heigold1 (Acolyte) on Jun 04, 2004 at 22:47 UTC | |
|
Re: $zip->addFile not working.
by ChemBoy (Priest) on Jun 04, 2004 at 22:50 UTC | |
|
Re: $zip->addFile not working.
by Old_Gray_Bear (Bishop) on Jun 04, 2004 at 23:55 UTC | |
|
Re: $zip->addFile not working.
by tadamec (Beadle) on Jun 04, 2004 at 22:53 UTC | |
by heigold1 (Acolyte) on Jun 04, 2004 at 22:59 UTC | |
|
Re: $zip->addFile not working.
by Roy Johnson (Monsignor) on Jun 04, 2004 at 23:50 UTC |