in reply to Populating options in html select.

I would still go with HTML::Template.

You could change how it looked:

<select name="whatever"> <!-- TMPL_LOOP NAME="whatever_select" --> <option value="<!-- TMPL_VAR NAME="id" -->" <!-- TMPL_VAR NAME="checked" --> > <!-- TMPL_VAR NAME="value" --> </option> <!-- /TMPL_LOOP --> </select>
This would need an array ref anyway.
$array_ref = [ { id => id1, checked => 'selected', value => 'one', }, { id => id2, checked => '', value => 'two', }, { id => id3, checked => '', value => 'three', }, ];