1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| #!/usr/bin/perl -w
use strict;
use File::Package;
my $uut='Tie::Gzip';
my $fp='File::Package';
$fp->load_package($uut);
tie *GZIP,'Tie::Gzip';
my $gzip=\*GZIP;
open($gzip,"> test.gz");
while(my $line=<$gzip>){
chomp $line;
print"$line\n";
}
close $gzip;
tie *OUT,'Tie::Gzip';
my $out=\*OUT;
open($out,"> test.gz");
print $out "I want to know more!\n"
close $out; |
评论