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

    Join Date
    Nov 2013
    Posts
    12
    Rep Power
    0

    Extracting zip files


    Hi,

    I am a newbie, can someone provide example , how to extract zip files through per script.

    Suppose, we have a source.zip file in my cwd. here looks my sample code

    use Cwd;
    use Archive::Extract;
    use Archive::Zip;
    my $tar = Archive::Zip->new;

    my $dir=cwd();
    opendir(DIR,$dir) or die $!;
    $tar->extract_archive('Source.zip');
    closedir(DIR);
    exit 0;


    But it is not working. Please help
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    843
    Rep Power
    496
    "It is not working" is a very poor explanation of your problem. Does your program compile? Does it run through to the end or does it fail before that? Or it the result different from what you expect? In which way?

IMN logo majestic logo threadwatch logo seochat tools logo