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

I use ActivePerl in WinXP and there is no examples directory in the Archive::ZIP package.
  • 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 toolic (Bishop) on Mar 25, 2011 at 20:35 UTC

      Thanks!

      OK, problem solved. The trick was to suppress the error reporting from the package with

      Archive::Zip::setErrorHandler (sub { });

      before trying to process the file, as they do in this example (well, almost, they still print the first warning there, but the idea was clear). Then just skip the file, if the attempt to read it does not return AZ_OK.

Re^3: Checking if a file is present in a ZIP archive
by choroba (Cardinal) on Mar 25, 2011 at 20:46 UTC
    Just set the error handler to empty sub to avoid printing the warnings.