Maybe a bold question, but why not use one of the modules in the cpan Compression:: namespace like Compression::Zlib ? These are specialised modules to do this job.
Laziness is a virtue.
update:
hardburn apperently types faster :(
--
Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
>>>>
Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<