This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix quotewords
[perl5.git] / lib / Text / ParseWords.pm
index f86c8c2..f2e1514 100644 (file)
@@ -95,12 +95,12 @@ sub quotewords {
     while (length($_)) {
        $field = '';
        for (;;) {
-            $snippet = '';
-           if (s/^"(([^"\\]|\\[\\"])*)"//) {
+           $snippet = '';
+           if (s/^"(([^"\\]|\\.)*)"//) {
                $snippet = $1;
                 $snippet = "\"$snippet\"" if ($keep);
            }
-           elsif (s/^'(([^'\\]|\\[\\'])*)'//) {
+           elsif (s/^'(([^'\\]|\\.)*)'//) {
                $snippet = $1;
                 $snippet = "'$snippet'" if ($keep);
            }