Move IO::Compress from ext/ to cpan/
[p5sagit/p5-mst-13.2.git] / cpan / IO-Compress / examples / io / gzip / gzappend
CommitLineData
25f0751f 1#!/usr/local/bin/perl
2
3use IO::Compress::Gzip qw( $GzipError );
4use strict ;
5use warnings ;
6
7die "Usage: gzappend gz-file file...\n"
8 unless @ARGV ;
9
10
11my $output = shift @ARGV ;
12
13@ARGV = '-' unless @ARGV ;
14
15my $gz = new IO::Compress::Gzip $output, Merge => 1
16 or die "Cannot open $output: $GzipError\n" ;
17
18$gz->write( [@ARGV] )
19 or die "Cannot open $output: $GzipError\n" ;
20
21$gz->close;
22
23
24