Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Archive::Zip for unzipping to directory?

by ferreira (Chaplain)
on Apr 14, 2008 at 12:47 UTC ( [id://680261]=note: print w/replies, xml ) Need Help??


in reply to Archive::Zip for unzipping to directory?

As yet another alternative: Archive::Extract can do it in a very straightforward manner:

use Archive::Extract; my $x = Archive::Extract->new( archive => ’archive.zip’ ); $x->extract( to => 'target/directory' ) or die $x->error;

It (Archive::Extract) has the bonus benefit of working for .tar.gz, .tar.bz2 and other archive types as well. In turn, it has some drawbacks in the current implementation that take the entire contents of the archive into memory (due to Archive::Tar and Compress::unLZMA, but that does not affect handling zip files, which can use Archive::Zip or the utility unzip under the hood.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://680261]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-20 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found