my $template=HTML::Template->new(filename=>'test.tmpl'); $template->param(DOMAINS => \@domains); print $template->output();