Download a zip file and extract to a directory

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I've written some scripts that manipulate Zip files using
Archive::Zip.  I'm now working on a script that uses "LWP::Simple" to
download data from a URL.  As part of this process I'm going to have
to download a zip file from a URL and then extract that zip file to a
particular directory.

Can I use LWP::Simple to download a binary file directly into a

I've looked at the Archive::Zip methods, and it doesn't appear as if I
can create the Zip object directly from the contents of a variable.
Will I have to download the zip file directly to a temporary file
(using "getstore($url, $file)"), I would imagine), and then create the
Zip object from that?

I see the "extractToFileHandle( $fh )" method on Archive::Zip. Is that
file handle supposed to be a directory?

Re: Download a zip file and extract to a directory

Quoted text here. Click to load it

Oh, never mind.  Using "Archive::Extract" is much easier for

Site Timeline