in reply to Re: Checking if a file is present in a ZIP archive
in thread Checking if a file is present in a ZIP archive

The problem is not that the file cannot be read. The file can be read just fine. However, if it happens not to be a ZIP archive, the Archive::ZIP package spews half a screen of errors from various parts of itself, essentially complaining about the missing signature and going downhill from there.
  • Comment on Re^2: Checking if a file is present in a ZIP archive

Replies are listed 'Best First'.
Re^3: Checking if a file is present in a ZIP archive
by bart (Canon) on Mar 25, 2011 at 21:13 UTC
    Then find a way to turn those warnings into a die, for eval; for example by temporarily setting $SIG{__WARN__}; or, if the module has a way to handle errors, use that. One such warning and it's game over.