use IO::Zlib; sub ok { my ($no, $ok) = @_ ; #++ $total ; #++ $totalBad unless $ok ; print "ok $no\n" if $ok ; print "not ok $no\n" unless $ok ; } $name="test.gz"; print "1..11\n"; $hello = < eq "hello - 123\n"); ok(8, read(IN, $uncomp, 1024) == length($hello)); ok(9, eof IN); ok(10, untie *IN); unlink($name); ok(11, $hello eq $uncomp);