LPM: Text::Template and server-side includes in HTML files

Joe Hourcle oneiros at dcr.net
Thu Aug 31 13:56:31 CDT 2000



On Thu, 31 Aug 2000 sungo at earthling.net wrote:

> On Thu, 31 Aug 2000, Joe Hourcle wrote:
> 
> > > > Does anyone who uses Text::Template know of a way around this without
> > > > getting rid of the server-side includes?
> 
> you can also throw the perl in your template and have it do a pseudo ssi.
> 
> <%  open BLAH, "header.html"; while(<BLAH>) { $OUT .= $_ }  close
> BLAH; $OUT %>

I don't know Text::Template myself, but I can still get rid of the while
loop:

<%  open (BLAH, '< header.html'); my @blah = <BLAH>; close
(BLAH); join('', at blah) %>

or

<%  open (BLAH, '< header.html'); my @blah = <BLAH>; close
(BLAH); "@blah" %>


-----
Joe Hourcle




More information about the Lexington-pm mailing list