use strict;
use warnings;
use HTML::Template;
my @items = map {{item => $_}} qw(first second third fourth);
my $template = HTML::Template->new(filehandle => *DATA);
$template->param(items => \@items);
print $template->output();
__DATA__
####
- first
- second
- third
- fourth