#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    7
    Rep Power
    0

    Using Archive::zip to uncompress a file


    Hi,

    I have been using the below code which has been working fine so far :

    $zip = Archive::zip->new();
    zipname = "abc.zip";

    $status = $zip->read($zipname); die "Failed\n" if $status != AZ_OK;


    But recently I am seeing errors saying

    format error : bad signature cannot unzip file with read 9, write 0.

    Any suggestions ?

    Thanks-
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    335
    Rep Power
    247
    What do you get if you try to access the members?

    Code:
    my $zip = Archive::Zip->new( "path_to_zip/abc.zip" );  
    my @member_names = $zip->memberNames;
    Last edited by 1DMF; July 16th, 2013 at 06:13 AM.
    Free MP3 Dance Music Downloads

    To err is human; To really balls things up you need Microsoft!

IMN logo majestic logo threadwatch logo seochat tools logo