in reply to Escape single quotes in a SQL query

  1. Use place holders. See the DBI manual.
  2. Use the quote method in the DBI.
  3. $value =~ s/'/''/g;