Yograjk has asked for the wisdom of the Perl Monks concerning the following question:

Strage problem. I am using RHEL 5.3. On compressing the file (gzip) I can view the same file using vi in plain text. However, the compressed file is of much small size. So I believe compression is working properly. But how can decompressed file be viewed as plain text? I am using comress::Zlib which inturn is using gzip for compression. If I compress a file on RHEL 5.5 using gzip then the file opens as binary. Now I cannot read the file without decompression. Why so?

Replies are listed 'Best First'.
Re: compress::Zlib / gzip
by moritz (Cardinal) on May 19, 2010 at 08:48 UTC
    Vim transparently decodes .gz files for you on opening, so that's why it appears the compression had no effect.
    Perl 6 - links to (nearly) everything that is Perl 6.