quote is used to quote a string that is to be used in an SQL query statement. Some databases have different methods of quoting the data in SQL statements, so to maintain as much compatibility as possible, use the quote function instead of quoting the data manually.
Example:
my $oldstring = "Brent's kids are named: Luc, Rae, and Logan."; my $newstring = $db_handle->quote($oldstring);
The string in $newstring is now ready to be used in an SQL statement and should have no problems with the handling of the apostrophe.