zenweezil
07-29-2004, 03:54 AM
Normally if I want to change a to b I do this:
$variable =~ s/a/b/g;
But am running into multiple issues when trying to replace an apostrophe and turn it into two apostrophes (' into '') for the obvious reasons of perl's use of single quotes.
Any ideas how I can do this effectively?
I tried escaping the quotes but was unsuccessful for some reason.
$variable =~ s/a/b/g;
But am running into multiple issues when trying to replace an apostrophe and turn it into two apostrophes (' into '') for the obvious reasons of perl's use of single quotes.
Any ideas how I can do this effectively?
I tried escaping the quotes but was unsuccessful for some reason.