in reply to CGI.pm and SSI

Check out Text::Vpp. It's a flexible preprocessor which handles include statements. That way, you can have statements like:
<P>And here is something from another file: @INCLUDE other_file.txt We now return to your regularly scheduled text. </P>
That's assuming that you want to use a preformatted template file. Otherwise, a useful shortcut is to use File::Copy:
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";
Theoretically, this might save some memory over reading the entire file into a string.

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