Gossamer Forum
Home : General : Perl Programming :

pattern match

Quote Reply
pattern match
when parse the form data.
i need to replace ' with \' . so the value could be insert to mysql.

unfortunately below seems not work at all.

so what is the correct code for it?


$value =~ tr/'/ \'/;





Thanks
Quote Reply
Re: [courierb] pattern match In reply to
You should use $dbh->quote($value)
Quote Reply
Re: [Paul] pattern match In reply to
Thanks you