http://www.perlmonks.org?node_id=1038804


in reply to Re^2: Archive::Zip Error
in thread Archive::Zip Error

Is there a way to ignore it?

eval is the standard mechanism for ignoring errors. If eval isn't working for you, and you want help, you need to post some code

Replies are listed 'Best First'.
Re^4: Archive::Zip Error
by bluesplay106 (Novice) on Jun 13, 2013 at 17:53 UTC
    I can't post my code due to my internship, so here is the general :
    $zip = Archive::Zip->new(); eval {$zip->read($filename);}; if($@) { print "Couldn't unzip $filename\n";}

      Archive::Zip's read method is documented to return an integer to signal an error, it won't die

      http://search.cpan.org/perldoc/Archive::Zip#read

      I can't post my code due to my internship

      Your actual code isn't required, just something that triggers the same error/problem, and something that doesn't require purchasing a special brand of soap, something self contained