sub download { my $filename = shift; my ($buffer, $read, $dir, $file); $dir = "/directory"; $file = "$dir/filename";
print "Content-Type: application/octet-stream; name=$filename\n"; print "Content-Disposition: inline; filename=$filename\n\n";
open (FILE, $file); while ($read = read (*FILE, $buffer, 1024)) { print $buffer; } close FILE; exit(0); }
:-)
|