wolis has asked for the wisdom of the Perl Monks concerning the following question:
I have a string of text and I want to save to disk in a compressed format.
I have had a look at Compress::Zlib and I have searched Perlmonks and the net for a simple example of writing a string to a file in ZIP or compressed format of some sort.
Everyone and every example appears to be based on reading ZIP files not writting them.. apart from the compress:zlib itself which is I cant make much sense of.
This is the kind of thing Im hoping I can do but Im obviously doing something wrong:
my $string = "This is a test string"; my $x = deflateInit() or die "Cannot do that\n"; open(OUT,">dmp.zip"); print OUT $x->deflate($string); close(OUT);
Thanks for any advice you can give
___ /\__\ "What is the world coming to?" \/__/ www.wolispace.com/cow <-- Visit my Creative Object World
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Compress zlib and friends
by monkey_boy (Priest) on Jul 15, 2005 at 09:25 UTC | |
by blazar (Canon) on Jul 15, 2005 at 10:31 UTC | |
|
Re: Compress zlib and friends
by blazar (Canon) on Jul 15, 2005 at 09:24 UTC |