sub download { my $filename = $_[0].$_[1]; use CGI; $html=new CGI; $| = 1; print $html->header( -type => 'application/zip', -charset => 'binary', -attachment => $_[1], -Content_length => -s $filename); open($peunter, "<", $filename); binmode($peunter); binmode STDOUT; while (read($peunter,$bytes,1024)) { print $bytes; } close($peunter); }