Problems? Is your data what you think it is? | |
PerlMonks |
Re: Clean a database record off an apostrophe 'by japhy (Canon) |
on Jul 29, 2002 at 19:39 UTC ( [id://186060]=note: print w/replies, xml ) | Need Help?? |
You can remove the character altogether: $field =~ tr/'//d, or you could backslash it: $field =~ s/'/\\'/g, or perhaps replace it with the HTML entity code ''': s/'/'/g;
_____________________________________________________
In Section
Seekers of Perl Wisdom
|
|