in reply to HTML::Template question.

I too, have used two template objects to solve this problem:
use strict; use warnings; use HTML::Template; use Inline::Files; my $skeleton = HTML::Template->new(filehandle => \*SKELETON); my @page = ( HTML::Template->new(filehandle => \*PAGE1), HTML::Template->new(filehandle => \*PAGE2), ); for (@page) { $skeleton->param(body => $_->output); print $skeleton->output; } __SKELETON__ <html> <body> <tmpl_var body> </body> </html> __PAGE1__ hello world __PAGE2__ foo bar baz qux
But, these days i prefer to use Template with it's ultra handy WRAPPER construct. I am sure that Template essentially has to do the same thing: load a seperate template and substitute values, but it does it for me. :) For example, all i need to do is create the skeleton (i'll call it skeleton.html)
<html> <head> <title>[% title %]</title> </head> <body> [% content %] </body> </html>
And some pages:
(page1.html) [% WRAPPER skeleton.html title="Page 1" %] hello world [% END %] ----------------------------------------------- (page2.html) [% WRAPPER skeleton.html title="Page 2" %] foo bar baz [% END %]
And i'm done. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)