use strict;
binmode STDOUT;
open F, "< files/data.zip";
binmode F;
print "Content-Type: application/octet-stream\n";
print "Content-Disposition: filename=data.zip\n\n";
my ($len, $off, $data) = (0, 0, undef);
while(len = read(F, $data, 1024, $off))
{
print STDOUT $data;
$off += $len;
}
close F;