I have a link to a word document that opens up the document when you click on it. However, I would like the user to be prompted to download with the usual download dialog box rather than have the document automatically open. I have done some research on using the "Content-disposition" key word, but it does not work for me. Please let me know if there is a problem with my code below or if there is a better way to do this.
#!/usr/local/bin/perl
print("Content-Type = application/ms-word\n\n"
print("Content-disposition: attachment; filename=Test_Doc.doc\n\n"
print "<html>";
print "<body> ";
print " Download word doc <a href='Test_Doc.doc'>here</a>";
print "</body>";
print "</html>";
#!/usr/local/bin/perl
print("Content-Type = application/ms-word\n\n"
print("Content-disposition: attachment; filename=Test_Doc.doc\n\n"
print "<html>";
print "<body> ";
print " Download word doc <a href='Test_Doc.doc'>here</a>";
print "</body>";
print "</html>";