in reply to How to escape single quote(s) without the use of quotemeta
Is this what you are after?
use Test::More tests => 1;
my $have = "This sting it's bothering to escape ' single characters";
my $want = "This sting it\\'s bothering to escape \\' single character
$have =~ s/'/\\'/g;
is $have, $want;
Thanks it works. I thought also about escaping the back slash character and I have tried it but it did not worked for me. I guess s and g is what I was looking for.
Thanks again for your time and effort.
BR / Thanos
Results (75 votes). Check out past polls.