my $value1="query"; my $value2="%"; my $selection = $dbh->selectall_arrayref("SELECT Tag1, Tag2, Term1, Term2 FROM table WHERE Tag1 LIKE '$value' AND Tag2 LIKE '$value2' ");