Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- CGI.pm: displaying .html file as the result
August 15, 2008, 8:07 pm
rate this thread
Hi, I hope this isn't too dumb of a question. How can I get my Perl
CGI script to display a flat HTML file (in fact, the same HTML file)
after the submit button has been clicked? Basically I have a flat HTML
file with a small form in it; I want the same page to redisplay after
the user has submitted.
Re: CGI.pm: displaying .html file as the result
You could issue a $cgi->redirect to that page. Or you could just
read the page from disk and print it to the browser:
print $cgi->header(), `cat foo.html`;
(If the page is very big, you might want to print it in chunks instead.)
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
- » How to solve the issue that \. is interpreted as any character in system("sed ... "); ?
- — Previous thread in » PERL Modules Announcements