require should ignore directories found when searching @INC not just
[p5sagit/p5-mst-13.2.git] / ext / Compress / Zlib / examples / gzstream
CommitLineData
f4c6fd49 1#!/usr/local/bin/perl
2
3use strict ;
8aa25532 4use warnings ;
f4c6fd49 5
25f0751f 6use Compress::Zlib ;
f4c6fd49 7
25f0751f 8binmode STDOUT; # gzopen only sets it on the fd
f4c6fd49 9
25f0751f 10my $gz = gzopen(\*STDOUT, "wb")
11 or die "Cannot open stdout: $gzerrno\n" ;
f4c6fd49 12
13while (<>) {
25f0751f 14 $gz->gzwrite($_)
15 or die "error writing: $gzerrno\n" ;
f4c6fd49 16}
17
25f0751f 18$gz->gzclose ;