use strict; use Template; $|++; my $template = Template->new( { INCLUDE_PATH => '..\templates' } ); my %data = ( name => 'Ovid', colors => [qw/ red black green /] ); $template->process( 'some.tmpl', $data ) or die $template->error(); #### Hi [% name %] Here are some colors: [% FOREACH color = colors; color; "\n"; END %]