in reply to Using PerlIO::gzip
use strict; use warnings; my $infile = 'hi.txt'; my $outfile = 'hi.gz'; open my $in, '<:raw', $infile or die $!; open my $out, '>:gzip', $outfile or die $!; while(defined( my $read = read $in, my $s, 2048 ) ){ die "Error reading 2048: $!" if $read != 2048; print {$out} $s; } close $in; close $out;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using PerlIO::gzip
by heigold1 (Acolyte) on Jun 25, 2004 at 21:17 UTC | |
by Anonymous Monk on Jun 26, 2004 at 02:50 UTC |