in reply to Escaping single quotes and DBI

Yup: read the DBI docs. Your problem is not specific to CGI -- it's just text, after all. In particular, go down to the quote() method and, if you're feeling industrious, read up on placeholders.

Additionally, a Super Search right here on Perlmonks using 'DBI' and 'quote' turns up a boatload of links.

Good luck

Chris
M-x auto-bs-mode