in reply to How to escape single quote(s) without the use of quotemeta
Is this what you are after?
use strict; use warnings; 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 +s"; $have =~ s/'/\\'/g; is $have, $want;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to escape single quote(s) without the use of quotemeta
by thanos1983 (Parson) on Apr 05, 2019 at 14:49 UTC |