------------------------------------------------
On Fri, 26 Sep 2003 04:59:34 -0500, "JOHN FISHER" <[EMAIL PROTECTED]> wrote:

> I am in a Windows environment using cygwin. The zip file has /r/n as a carriage 
> return (so annoying). When I ran the script below it dumped out a lot of bizarre 
> chars to the screen. I guess this is some of the zip metadata. Using unzip -p 
> zipfile.zip it prints cleanly. The doc states:
>  "At this time gzreadline ignores the variable $/ ($INPUT_RECORD_SEPARATOR or $RS 
> when English is in use). The end of a line is denoted by the C character '\n'."
> Do you think this might be throwing the script or did I do something incorrect?
> The mode is just from the example. The cpan doc says check out the zlib doc for the 
> values, but I have been unable to locate it. perldoc zlib comes up empty.
> Should I use binmode? I cannot think how to set that up. It wants a filehandle, but 
> you can see I have gzopen'd the filename.
> 

Ok that may help to clear things up, but 1 question first.  Is this a 'zip archive' 
file or is it a 'zipped file'.  In other words, is this an archive that contains 
multiple files in the sense of WinZip, etc. (excuse my lack of Win32 knowledge), or is 
it a single file that has been compressed in the gzip unix manner?

Compress::Zlib is intended for the latter use, and I suggested it because you 
mentioned zgrep which generally handles the gzipp'd version rather than the former, 
someone else mentioned Archive::Zip which is used for the first.

FAQ for Archive::Zip sums it up nicely:

"Can't use Archive::Zip on gzip files

Q: Can I use Archive::Zip to extract Unix gzip files?

A: No.

There is a distinction between Unix gzip files, and Zip archives that also can use the 
gzip compression.

Depending on the format of the gzip file, you can use Compress::Zlib, or Archive::Tar 
to decompress it (and de-archive it in the case of Tar files).

You can unzip PKZIP/WinZip/etc/ archives using Archive::Zip (that's what it's for) as 
long as any compressed members are compressed using Deflate compression."

Is this where the snag lies?

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to