in reply to Zip file CRC validation

my $fh = IO::File->new_tmpfile or print "Unable to make ne +w temp file: $!"; $member->extractToFileHandle($fh); if ($member->extractToFileHandle($fh) != 0){ print "Error in $archivedir$filename\n"; next; } seek($fh, 0, 0); binmode($fh);

You should binmode the filehandle just after you create it.

Replies are listed 'Best First'.
Re^2: Zip file CRC validation
by msalerno (Beadle) on Jul 06, 2009 at 21:46 UTC
    I moved the binmode and it made no difference.
    my $fh = IO::File->new_tmpfile or print "Unable to make ne +w temp file: $!"; binmode($fh); $member->extractToFileHandle($fh);
    my $fh = IO::File->new_tmpfile or print "Unable to make ne +w temp file: $!"; $member->extractToFileHandle($fh); binmode($fh);
    Output: From CALC: 2b35e7ab From ZIP: 9bdd56f6 test.log Thanks for the suggestion.