4.10. Quoting special characters in SQL

Sometimes you want to use a value in yoru SQL which may contain characters which have special behaviour in SQL, such as a percent sign or a quote mark. Luckily, there is a method which can automatically escape all special characters:

my $string = "20% off all stock";
my $clean_string = $dbh->quote($string);