title: How can I escape single and double quotes in SQL prepared statement?
body: <p>I have a SQL statement similar to the one shown below in Perl:</p>
  
  <pre><code>my $sql="abc..TableName '$a','$b' ";
  </code></pre>
  
  <p>The $a is free text which can contain anything including single quotes, double quotes, back- and front-slash characters, etc.  </p>
  
  <p>How can these characters be escaped to make the SQL statement work?</p>
  
  <p>Thanks.</p>