in reply to Compressing Data On The Fly

gaal++ has given you my favorite solution to this. Here's detail of how to use it:

use PerlIO::gzip; open UPLOADFILE, '>:gzip', "$upload_dir/$uldate" or die $!; # . . .
If you wish, you can add the gzip layer with binmode, instead.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Compressing Data On The Fly
by gaal (Parson) on May 15, 2005 at 05:32 UTC
    And in reading,

    open my $fh, '<:gzip(autopop)', $file or die $!; This transparently falls back on ungzipped where the file is not compressed. There's a warning in the docs about using it, but in many cases it's an excellent tool.