Help, please.
I am using ActiveState Perl on Win32 and utilizing the Archive::Zip module.
I have a master zip file that contains standard files, such as raw ASCII text, and
one or more zip files. (e.g. sub zip within a master zip)

I am successfully:
- extracting one of the sub zip files from the master zip.
- updating and replacing the file in the sub zip. This is working so I am faily confident that I am using the methods
in the proper fashion.

The error is when I am attempting to replace the sub zip in the master zip.
What is different with this step is I am adding a file that is already a zip file.
Is the module capable of adding a zip to a zip?

Here is the error displayed:

IO error: reading data : Bad file descriptor Archive::Zip::ZipFileMember::_readRawChunk('Archive::Zip::ZipFileMe +mber=HASH(0xb38a2a0)', 'SCALAR(0xb3913ac)', 32768) called at E:/Perl/ +site/lib/Archive/Zip.pm line 1774 Archive::Zip::Member::readChunk('Archive::Zip::ZipFileMember=HASH(0 +xb38a2a0)', 32768) called at E:/Perl/site/lib/Archive/Zip.pm line 206 +1 Archive::Zip::Member::_writeData('Archive::Zip::ZipFileMember=HASH( +0xb38a2a0)', 'IO::File=GLOB(0xb3a561c)') called at E:/Perl/site/lib/A +rchive/Zip.pm line 2030 Archive::Zip::Member::_writeToFileHandle('Archive::Zip::ZipFileMemb +er=HASH(0xb38a2a0)', 'IO::File=GLOB(0xb3a561c)', 1, 251050) called a +t E:/Perl/site/lib/Archive/Zip.pm line 723 Archive::Zip::Archive::writeToFileHandle('Archive::Zip::Archive=HAS +H(0x1f12968)', 'IO::File=GLOB(0xb3a561c)') called at E:/Perl/site/li +b/Archive/Zip.pm line 757 Archive::Zip::Archive::overwriteAs('Archive::Zip::Archive=HASH(0x1f +12968)', 'E:\applications\.\DailyRpts2\temp\CS0245-1_DY051217.zip') c +alled at E:/Perl/site/lib/Archive/Zip.pm line 741 Archive::Zip::Archive::overwrite('Archive::Zip::Archive=HASH(0x1f12 +968)') called at E:\applications\dailyrpts2\DailyRpts2.pl line 926 main::PrepareTrancardForLoad('E:\applications\.\DailyRpts2\temp\TRA +NCARD.ZIP', 3) called at E:\applications\dailyrpts2\DailyRpts2.pl lin +e 579 main::ProcessZipMembers() called at E:\applications\dailyrpts2\Dail +yRpts2.pl line 481 main::ProcessDYZipFiles() called at E:\applications\dailyrpts2\Dail +yRpts2.pl line 235 Undefined subroutine &Archive::Zip::Archive::_printError called at E:/ +Perl/site/lib/Archive/Zip.pm line 791.

Edited 3 Jan 2006, by footpad: Added <code> tags to make errors easier to read.


In reply to Archive::Zip error by john7701

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.