From: Nicholas Clark Date: Thu, 27 Jan 2005 11:12:34 +0000 (+0000) Subject: &_q needs to *globally* escape ' and \ in its substitution. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d279d8f862ed0ca55e61f5b5b7382ed4ed045266;p=p5sagit%2Fp5-mst-13.2.git &_q needs to *globally* escape ' and \ in its substitution. p4raw-id: //depot/perl@23883 --- diff --git a/t/test.pl b/t/test.pl index 36a12c3..7550b49 100644 --- a/t/test.pl +++ b/t/test.pl @@ -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'"; }