Up Prev Next
From: "Tanja Davidson" <tanja_davidson at ncsu dot edu>
Subject: single quotes and perl
Date: Jan 12 2001 5:02PM
I've got a newbie perl programmer question.
I've been using sybase::Ctlib to do my database connections and all has
gone fine until I realized that there's a problem with single quotes if
they exist in the text fields of my web forms.
Can anyone give me a work around for inserting and searching on text
variables which may have embedded single quotes?
The docs I've found so far have said to $var=~s/'/''/g but that ends up
inserting two single quotes into my database which is unacceptable.
This should be a fairly simple question for any guru who has done much
perl programming with sybase databases and the web.
Thanks in advance!