Hi i have a .Z file generated by compress and i need read this file in a
Perl script.
I install the Compress::Zlib to do this, but the samples of Compress::Zlib
dont work !!
The example work like a 'cat file.Z' not a zcat.
What is wrong ??
Any body have a sample ???
Sorry the bad English ....
In next lines the example :
use strict ;
use warnings ;
use Compress::Zlib ;
die "Usage: gzcat file...\n" unless @ARGV ;
my $file ;
foreach $file (@ARGV) {
my $buffer ;
my $gz = gzopen($file, "rb")
or die "Cannot open $file: $gzerrno\n" ;
binmode STDIN;
print $buffer while $gz->gzread($buffer) > 0 ;
die "Error reading from $file: $gzerrno" . ($gzerrno+0) . "\n"
if $gzerrno != Z_STREAM_END ;
$gz->gzclose() ;
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]