Dan Muey wrote:
> > Greetings to all that is Perl
>
> Howdy
>
> >
> > Is it possible to specify using a cgi script to read and
> > output a Pure HTML file as output.. so that it can process
> > the form data..
>
> Do you mean can it output an html form to a browser, process it on submit and return
> html to the browser?
>
> Sure can.
>
> You simply have it print html code:
Hi Dan,
I don't think that is actually what he is asking for.Unless I misunderstand, he is
referring to a
pass-through program. Of course, a pure passthrough program would be pointless--it
would be quicker to serve
the page up directly through a http GET. OTOH, if you have some simple insertion
magic to do on a template
page, this is a very goo strategy, and one I use:
open (WEATHERPAGE, "Current_Vantage_Pro.htm") || die ("can't open source file");
my $CurrentLine = "";
while (!(($CurrentLine = <WEATHERPAGE>) =~ /head/i)) {;}
# the head section is sent elsewhere, as is the CGI header
while (!(($CurrentLine = <WEATHERPAGE>) =~ /\/table/i)) {
print "$CurrentLine";
}
print "$CurrentLine";
if (my $Test = GetConditions ($contents)) {
InsertWarning ($contents);
}
while ($CurrentLine = <WEATHERPAGE>) {
print "$CurrentLine";
}
close WEATHERPAGE;
}
Of course this presumes that either:
The source file has the CGI Content-type header, or that the program has already sent
it. Once the proper
header is sent, it is perfectly easy to pass through a local file.
As to style, this was one of my ealry scripts. I now use choo_choo_train rather than
CamelBack for
identifiers other than class names. May have to do some "Replace All" magic on my
work from this period..
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]