in reply to Tar File To Web Browser

If you have tar locally installed then another solution may be a pipeline. The exact options depend on the version of tar. For instance to produce a gzipped tar file using GNU tar try the following:
my $cmd = "tar -T - -cvz -"; open (TAR, "| $cmd") or die "Cannot run '$cmd': $!"; print TAR map "$_\n", @files; close TAR;
One nice thing about this is that this is incremental. Data starts streaming immediately without having to store all of the data in memory.