From b09c05e65698d8bad3544ae2c60fdbf601f0fa72 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 28 Feb 2010 08:48:33 -0700 Subject: [PATCH] Note this doesn't work: $re = "\\N{...}"; /$re/ --- pod/perldiag.pod | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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/; -- 1.8.3.1