I have a SQL-Statement with a Regular Expression and I want to use a scalar in that expression: (Looking for something like "$tool =~ m/\Q$x\E/" )
#Find tools with xxxxxx in the name: $dbh->prepare ("SELECT name FROM toolbox WHERE name REGEX '$x'"); #or $dbh->prepare ("SELECT name FROM toolbox WHERE name RLIKE '$x'"); $sth->execute(); my ($name_of_tool) = $sth->fetchrow_array; $sth->finish(); (Don´t need to mention that this don´t work as expected, but I don´t know how to escape it the right way. ^^) Thanks, Bastian