我想根据数据库中的值选择选择框。
代码 :
my $bug_id = $cgi->param('id');
#query for fetching the datas from the table category_bug_map for updating the select box
my $selectboxcategoryQuery = "SELECT os,cp,service FROM category_bug_map WHERE bug_id=$bug_id";
my $statusQuery2 = $dbslave -> prepare($selectboxcategoryQuery);
$statusQuery2 -> execute();
my($OS,$CP,$ser) = $statusQuery2 -> fetchrow_array();
$vars->{'select_os'} = $OS;
$vars->{'select_cp'} = $CP;
$vars->{'select_ser'} = $ser;
我想使用模板文件中的变量来选择(更新)选择框。我该如何执行此操作?