use SQL::Abstract; my $sa = SQL::Abstract->new; # in _lookup(): my $query = "SELECT $indy->{string} FROM $indy->{table} ". "WHERE $indy->{index}=$row->{$fieldName}"; my ($sql, @bind) = $sa->select( $indy->{table}, [$indy->{string}], { $indy->{index} => $row->{$fieldName} } ); my ($val) = $db->selectrow_array( $sql, {}, @bind ); return $val; # in _show_bugs(): my ($query,@bind) = $sa->select('Bug', \@fieldset, {bugid=>[split(/,/,$args)]} ); my $sth = $db->prepare( $query ); eval { $sth->execute(@bind); };