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

bluesplay106 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Is there any way I can ignore Archive::Zip errors? Thanks

Replies are listed 'Best First'.
Re: Archive::Zip Error
by ww (Archbishop) on Jun 13, 2013 at 16:44 UTC
    Pls see I know what I mean. Why don't you?.
    • what errors?
    • what code?

    Pls be more specific. You can update this node (include a note that you did so) to provide the code that causes the error and the error message(s).


    If you didn't program your executable by toggling in binary, it wasn't really programming!

      I received an 'format error: CRC or size mismatch after reading data descriptor' from Archive::Zip, but I just want a way to ignore it. I did eval and that didn't work.

        bluesplay106:

        Are you sure it's failing on the read? You might put the new into the eval as well. I've not used Archive::ZIP, but if I were implementing it, I'd read the table of contents when I opened the file.

        ...roboticus

        When your only tool is a hammer, all problems look like your thumb.

Re: Archive::Zip Error
by Anonymous Monk on Jun 13, 2013 at 16:19 UTC

    Hi, Is there any way I can ignore Archive::Zip errors? Thanks

    Sure, eval

      I did try eval but I received a 'format error: CRC or size mismatch after reading data descriptor' from Archive::Zip and my program still exits. Is there a way to ignore it?

        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