in reply to Populating options in html select.

Another idea is to use HTML::Template::Expr and do something like this:
<option value="<!--TMPL_VAR NAME=yourOptionValue -->" <!--TMPL_IF +EXPR="yourPerlSelectFunction()" -->selected<!--/TMPL_IF -->> <!--TMPL +_VAR NAME=yourOptionText --></option>
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.