Link to home
Start Free TrialLog in
Avatar of Lee5
Lee5

asked on

Return a document

How can I have a perl script return a document to the browser.  For example a .txt file or a .doc file.  Some of the documents contain html tags, so I can't just print them back.  It needs to be something like the the response to http://www.aaa.com/doc.txt
Avatar of hutter
hutter
Flag of Germany image

Try

$some_url = "http://www.aaa.com/doc.txt";
print "Location: $some_url\n\n";

Avatar of Lee5
Lee5

ASKER

The statement:
print "Location: $url\n\n";
prints out the value of $url
Also, can't find any reference to the tag "Location"
ASKER CERTIFIED SOLUTION
Avatar of hutter
hutter
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lee5

ASKER

You are right
I had a print context type at the top of the page.
thanks for the help