in reply to using 'require' to insert code

If you need to keep the HTML coders happy by providing an external file that is as HTML-only as possible, perhaps you should consider just having that file in pure HTML, reading it in, and printing it. Like:
my @html; open(HTML,"<$TheHtmlFile"); @html = <HTML>; close HTML; print @html;
This presumes that you have already emitted the required HTTP header, of course, and will also work perfectly well when you move over to CGI.

Update: And note syn's reply below, particularly if the HTML file is large.

-HZ

Replies are listed 'Best First'.
Re: Re: using 'require' to insert code
by synapse0 (Pilgrim) on Jul 23, 2001 at 10:17 UTC
    Well, I have something to say to main poster and a reply to HZ.. To the main poster, start using CGI.pm it's really just as simple as:
    #!/usr/bin/perl -wT use CGI; my $cgi = new CGI; print $cgi->header;
    And then just throw in CGI specific code as you learn it.. but you don't *need* any more lines than that, and to know that you can grab POST and GET data by calling $cgi->param();
    As for the sample above.. there's no reason to put possibly large html files into a memory consuming array, better to just read them in and spit them out (unless of course the data needs to be manipulated):
    open(HTML, "<$htmlfile") || die "ouch $!"; print <HTML>; close(HTML);
    -Syn0