Tim Bowden wrote:
On Mon, 2007-12-10 at 10:16 +0100, Gunnar Hjalmarsson wrote:
It may be easier to do it in two steps:
1. Upload and save the zip file to disk without Archive::Zip
2. Manipulate the file to your liking
That was my first approach, and it works fine (manipulating the zip file
on disk using 'system "unzip...";' etc), but I was looking to speed
things up by avoiding unnecessary writing to disk. As the zip file is
already in a perl object, I figured it would be more efficient to either
manipulate it in place (CGI object), or create a new object designed for
zip files (Archive::Zip). Is my thinking way off, or is it worth
pursuing?
It should be noted that the uploaded file is saved on disk as a
temporary file. Also, I can't help wondering if efficiency really is an
issue in this case. The main goal ought to be getting the job done. ;-)
Anyway, your thinking makes some sense. Looking at the Archive::Zip
docs, it appears as if you might have more success if you use the
readFromFileHandle() method rather than the read() method.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/