From: Eric Durant Subject: Re: How to compress to ZIP instead of gzip? Date: 06 Feb 2000 00:00:00 GMT Message-ID: <389DD7D6.4692E30C@engin.umich.edu> Content-Transfer-Encoding: 7bit References: <867ec6$a37$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@eecs.umich.edu X-Trace: news.eecs.umich.edu 949868477 77789 141.213.6.56 (6 Feb 2000 20:21:17 GMT) Organization: University of Michigan Electrical Engineering & Computer Science Dept. Mime-Version: 1.0 NNTP-Posting-Date: 6 Feb 2000 20:21:17 GMT Newsgroups: comp.infosystems.www.servers.unix global3@my-deja.com wrote: > use LWP::Simple; > > @args = ("/usr/contrib/bin/gzip", "-q9", "file.txt"); > system(@args) == 0 > or die "system @args failed: $?"; > > My question is how can I compress the file into a zip file > instead of a gzip file. I searched CPAN but could not find > anything to to that. Is there anyway to modify my code above > to create a .zip file instead of a gzip file? Besides what was written in the other follow-ups, keep in mind that zip has different default behavior than gzip or compress. If you want zip to behave more like gzip, you'll want to use -o (to preserve the time-stamp on the archive) and -m (to delete the source file after compression). -q and -9 have pretty much the same meaning for zip as they do for gzip. -- Eric Durant http://www.edurant.com/