My first suggestion is to not re-invent the wheel, see for example SQL::Abstract (Update: example).
Also, you should always use placeholders wherever possible - see Bobby Tables!
DBI provides quote and quote_identifier, but I'd consider those a last resort if the above is not applicable for whatever unlikely reason.
In reply to Re: Escaping Apostrophe
by haukex
in thread Escaping Apostrophe
by perl_gvenk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |