in reply to Perl - Socket and Data Compression
If you want a perl solution you could use something like the following to get the tar-gzipped data into perl
open(F,'-|',"tar czf - $dir") or die ... [download]