Seem to have stated my own solution. $outlog=gzopen($fn,"a"); specifies appendage to a file whereas $outlog=gzopen($fn,"wb"); specifies overwriting a file.
Does anyone know how to READ a gzip file into an array? -Shannon > Hi all, > > I'm running a site with a lot of compressed text files containing data for > various clients. Some of these files get appended to (lets say, a log file > perhaps). Is there some prevision to the Compress:Zlib module that lets you > specify that you want to append to a file? (instead of needing to read the > entire file in, appending to the array or variable, then writing it back > again?) > > The open(TAG,$filename); command has the >> part before the filename to > specify that print OUTPUTFILE 's are appended to the file only. > > This is the method I'm using at the moment to read the file without appendage: > > use Compress::Zlib; > > $fn = 'test.gz'; > > > my $outlog=gzopen($fn,"a"); > > $line='line number 234'; > > $outlog->gzwrite($line."\n"); > > $outlog->gzclose(); > > print "done.\n"; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]