in reply to PerlIO::gzip - Handling Corrupt tar file

Posting an example of the relevant code might help here

Are you, for instance, using the default layer arguments on PerlIO::gzip ? I do not know, I cannot tell, and I smashed my crystal ball up last week.

Do you check if the file opened successfully?

  • Comment on Re: PerlIO::gzip - Handling Corrupt tar file

Replies are listed 'Best First'.
Re^2: PerlIO::gzip - Handling Corrupt tar file
by snra_perl (Acolyte) on Sep 28, 2009 at 15:48 UTC
    Here is the snippet..

    if ( $log =~ /.tar.gz$/ ) { unless ( open LOG, "<:gzip", $log ){ log_msg (LOG_ERR, "Cannot open $log for read : File may be + corrupt"); next; } }


    I also tried with the argument as lazy. The thing is ,when i try to untar those files manually , i am getting some errors. But the script tries to open those files and read