#!/usr/bin/perl use strict; use warnings; use HTML::Template::Compiled; my $bad_userinput = ""; my $options = [ { value => 1, label => 'option 1' }, { value => 2, label => 'option 2' }, ]; my $template = HTML::Template::Compiled->new( filename => 'test.tmpl', default_escape => 'html', ); $template->params( bad_userinput => $bad_userinput, options => $options, ); print $template->output;