On Wed, 5 Dec 2001, Richard S. Crawford wrote:

> Long time reader, first time writer here...
>
> For a personal project, I would like to use Perl to generate static HTML
> pages.  Can the output of CGI be redirected to a file which can be read
> later by a browser?  What is the best way to approach this problem?

Sure, instead of printing to the browser, print to a file (assuming you
are using CGI.pm, and if you aren't, why not?)

use CGI;

open HTML, ">index.html" or die "Could not open index.html: $!\n";

print HTML start_html, h1("something"), end_html;

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
After an instrument has been assembled, extra components will be found
on the bench.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to