WC -Sx- Jones wrote:
Andrew Gaffney wrote:

INSERT INTO people VALUES(NULL, "Firstname", "Lastname", ""123 Anywhere Address"", ...");
INSERT INTO people VALUES(NULL, "Firstname", "Lastname", '123 O'Walley Street', ...");


See the problem? I can't use either quoting consistently due to the nature of the data I'm working with.


Clean the data before saving it?

s,^["'],,; # Kill Starting Quotes
s,["']$,,; # Kill Ending Quotes

Or convert them to a storable
character: | for " and ~ for '

I ended up stripping double quotes (s/\"//g) and escaping single quotes (s/\'/\\'/g). This seems to work for me.


--
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to