#!perl use strict; use Archive::Zip; use CGI qw(:standard); my $zip = Archive::Zip->new(); $zip->addFile('c:/temp/inet/test.pdf','test.pdf'); print header(-type=>'application/zip',-attachment=>'download.zip'); binmode(STDOUT); $zip->writeToFileHandle(*STDOUT);