#!/usr/bin/perl -w use CGI; use HTML::Template; use strict; my @ref = ( { value => '1', text => 'a', }, { value => '2', text => 'b', }, { value => '3', text => 'c', }, { value => '4', text => 'd', }, { value => '5',text => 'e', }, ); my $q = new CGI; print $q->header; my $template = HTML::Template->new(filename => 'test.tmpl'); $template->param(list => \@ref); print $template->output;