Sorry, I assumed you had read the docs and were still having problems.
>From SQL::Statement man pages
Strings
Surrounded by either single or double quotes; some characters need to be
escaped with a backslash, in particular the backslash itself (\\), the NUL
byte (\0), Line feeds (\n), Carriage return (\r), and the quotes (\' or \``).
There are three ways to achieve this:
quote it yourself:
my $sql = q{INSERT INTO mytable (id, val) VALUES (999, 'Isn\'t Perl Great'};
use the $dbh->quote method:
my $val = $dbh->quote("Isn't Perl Great")
my $sql = q{INSERT INTO mytable (id, val) VALUES (999, '$val'};
or use bind values:
my $sql = q{INSERT INTO mytable (id, val) VALUES (?, ?)};
my $sth = prepare($sql);
$sth->execute(999, "Isn't Perl Great");
--
Simon Oliver