diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-01-27 11:12:34 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-01-27 11:12:34 +0000 |
commit | d279d8f862ed0ca55e61f5b5b7382ed4ed045266 (patch) | |
tree | 1a6ce8bdbdf9b80ac1ac2b67454533860ad0e801 /t/test.pl | |
parent | da21930332ec1997612ca0fbcfe4ac176237c0e5 (diff) | |
download | perl-d279d8f862ed0ca55e61f5b5b7382ed4ed045266.tar.gz |
&_q needs to *globally* escape ' and \ in its substitution.
p4raw-id: //depot/perl@23883
Diffstat (limited to 't/test.pl')
-rw-r--r-- | t/test.pl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -101,8 +101,8 @@ sub _q { my $x = shift; return 'undef' unless defined $x; my $q = $x; - $q =~ s/\\/\\\\/; - $q =~ s/'/\\'/; + $q =~ s/\\/\\\\/g; + $q =~ s/'/\\'/g; return "'$q'"; } |