#! /usr/bin/perl use strict; use warnings; use HTML::Template; my $options_file = q{options.txt}; open my $fh, q{<}, $options_file or die qq{cant open *$options_file* to read: $!}; my @options = <$fh>; chomp @options; my @sel; for my $option (@options){ my ($value, $text) = split(q{ }, $option, 2); push @sel, {value => $value, text => $text}; } my $t = HTML::Template->new(filename => q{template.html}); $t->param(loop => \@sel); print $t->output; #### Image image Fimage fimage other other, please specify ####