in reply to CGI.pm and SSI
That's assuming that you want to use a preformatted template file. Otherwise, a useful shortcut is to use File::Copy:<P>And here is something from another file: @INCLUDE other_file.txt We now return to your regularly scheduled text. </P>
Theoretically, this might save some memory over reading the entire file into a string.use File::Copy; ## ... print STDOUT "<P>And here is something from another file:\n"; copy('other_file.txt', \*STDOUT) or print STDOUT "[Oops: $!]\n"; print STDOUT "We now return you to your regularly scheduled text.\n";
If you want to keep your HTML separate from your code (which is a worthy goal), then use one of the templating systems mentioned above.
stephen
|
|---|