in reply to Re: Archive::Zip Compaitibility Issues??
in thread Archive::Zip Compaitibility Issues??

Ok, I've tried all the suggestions up to this point. Upgraded where possible, tried to do a simple non gui script (has the same problem), and have turned trict and warnings on and off with no change. Perhaps it is time to set my desk on fire?
use Archive::Zip; use strict; use warnings; my $zip=Archive::Zip->New(); my @filestozip=('RED_b0.apf','RED_b1.apf','RED_b2.apf','RED_b3.apf'); my $filelist=$zip->addFile(@filestozip); $zip->writeToFileNamed('testthis.zip');

Replies are listed 'Best First'.
Re^3: Archive::Zip Compaitibility Issues??
by almut (Canon) on Dec 15, 2008 at 17:58 UTC
    my $filelist=$zip->addFile(@filestozip);

    Two things to note here: (1) addFile() does not take a list of files, (2) it returns undef "if the name given does not represent a readable plain file or symbolic link".  I'm not entirely sure whether that's the issue in your case, but at least, it's worth checking the return value...

      Naw the problem is in the calling of the Module. The USE statement is causeing the problem. Regardless of what I put below it.
Re^3: Archive::Zip Compaitibility Issues??
by admiral_grinder (Pilgrim) on Dec 15, 2008 at 19:12 UTC
    I cut and pasted this and got the following error: Can't locate object method "New" via package "Archive::Zip" at use_test.pl line 7.
      So I guess this means that my Computer is a pile... Because that EXACT code you ran to error... just does nothing for me.
      Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\>perl zipper.pl C:\>
        Try
        perl.exe zipper.pl perl5.10.0.exe zipper.pl C:\perl\bin\perl.exe zipper.pl