If you're using Perl 5.8.0 or (preferably) later, check out PerlIO::gzip, which makes it really simple and easy to have your output written in gzip-compressed form.
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). | [reply] |