From: Karl Williamson Date: Sun, 28 Feb 2010 15:48:33 +0000 (-0700) Subject: Note this doesn't work: $re = "\\N{...}"; /$re/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b09c05e65698d8bad3544ae2c60fdbf601f0fa72;p=p5sagit%2Fp5-mst-13.2.git Note this doesn't work: $re = "\\N{...}"; /$re/ --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index e1f02db..fbbf907 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -2645,12 +2645,13 @@ specialness: it matches almost everything, which is probably not what you want. (F) When compiling a regex pattern, an unresolved named character or sequence was encountered. This can happen in any of several ways that bypass the lexer, -such as using single-quotish context: +such as using single-quotish context, or an extra backslash in double quotish: $re = '\N{SPACE}'; # Wrong! + $re = "\\N{SPACE}"; # Wrong! /$re/; -Instead, use double-quotes: +Instead, use double-quotes with a single backslash: $re = "\N{SPACE}"; # ok /$re/;