in reply to Re^2: CRC Error on ZIP Files
in thread CRC Error on ZIP Files

If you are on Windows, you really need to

binmode STDOUT;
before printing. On all other operating systems, it's still good practice. Maybe try that, and alternatively, first create the ZIP file on disk, and manually download it through a trusted, different way, just to make sure that the ZIP file itself is not corrupted.

Replies are listed 'Best First'.
Re^4: CRC Error on ZIP Files
by SearchigPerl (Acolyte) on Mar 01, 2014 at 19:22 UTC
    Hi Corion,

    my deepest gratitude to you for your idea of testing the zip file on disk !
    I have been assuming the zip file itself would be generated wrongly. Now I
    realize it's not ! The zip file, prior to downloading is working perfectly fine. The
    problem lies within the download-script. Yet having added the command
    binmode STDOUT; did not alter anything.

      Did you look at the expected and actual file sizes? I note in your download subroutine that you never check whether open succeeds. Maybe the file you are trying to open does not exist?

      my $filename= $_[0].$_[1]; open my $peunter, '<', $filename or die "Couldn't open '$filename': $!"; ...