- or download this
use DBI;
use HTML::Template;
...
</select>
<p><input type="submit" /></p>
</form>
- or download this
$_->{id} == param('state') and $_->{sel} = 1 for @$states;
- or download this
<option value="<tmpl_var id>" <tmpl_if sel>selected="1"</tmpl_if>>
<tmpl_var name>
</option>
- or download this
... beginning same as before ...
my $states = $dbh->selectall_arrayref( ... );
...
<tmpl_var states>
<p><input type="submit" /></p>
</form>