use strict; use warnings; use CGI qw(:header); use Template; print header; my $t = Template->new(); $t->process(\*DATA, { title => 'HTML Sample', toc => 'Table of Contents', body => 'Sample text', }) or die $t->error(); __DATA__ [% title %] [% toc %]
[% body %]