M
me
I have a perl script generating HTML code. I'd like to include some
existing HTML files (e.g. header.htm, footer.htm) in the output,
while the perl program will generate the majority of the html code.
I know I can do a "require" statement and pull the files in while the
perl program runs. I have a couple questions though:
1. Is it possible to get the web server to parse the perl output and
simply have a standard #include in the generated html that would
include the header and footer just before delivery to the client? Or
will the server always deliver the program output directly with no
further parsing?
2. If it's possible to put the #include in there (item 1 above), is
this a more or less efficient way to deliver the code? In other words,
does it make more sense to have the perl code run once and include all
that's needed, or will the server be more efficient at doing the
include? This specific implementation will be in a shared server
environment, so I don't know that I can count on the included files
being buffered anywhere on the server.
Thanks,
existing HTML files (e.g. header.htm, footer.htm) in the output,
while the perl program will generate the majority of the html code.
I know I can do a "require" statement and pull the files in while the
perl program runs. I have a couple questions though:
1. Is it possible to get the web server to parse the perl output and
simply have a standard #include in the generated html that would
include the header and footer just before delivery to the client? Or
will the server always deliver the program output directly with no
further parsing?
2. If it's possible to put the #include in there (item 1 above), is
this a more or less efficient way to deliver the code? In other words,
does it make more sense to have the perl code run once and include all
that's needed, or will the server be more efficient at doing the
include? This specific implementation will be in a shared server
environment, so I don't know that I can count on the included files
being buffered anywhere on the server.
Thanks,