in reply to Zip Enlightenment
If you really do want to use GNU gzip-style compression to read and/or write files with gzip-compressed data, the easiest way to do this (IMO) is with PerlIO::gzip -- which makes use of the Perl 5.8.x "IO-layers":
Note that PerlIO::gzip is not (yet) part of the Perl 5.8.x standard distribution (I wish it was) -- you have to get it from CPAN.#!/usr/bin/perl -w # (might as well make it "cross-platform") require 5.008 require PerlIO::gzip; open FIL, ">:gzip", "C:/test.gz" or die "oops: $!"; print FIL "This behaves like any other file handle, but output gets gz +ipped\n"; close FIL;
UPDATE: (2010-10-18) It seems that PerlIO::gzip should be viewed as superseded by PerlIO::via:gzip. (see PerlIO::gzip or PerlIO::via::gzip).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Zip Enlightenment
by SamCG (Hermit) on Jan 24, 2005 at 15:08 UTC | |
by gmpassos (Priest) on Jan 24, 2005 at 23:06 UTC |