summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perldata.pod8
1 files changed, 7 insertions, 1 deletions
diff --git a/pod/perldata.pod b/pod/perldata.pod
index 8bf3dfdab3..e46507a759 100644
--- a/pod/perldata.pod
+++ b/pod/perldata.pod
@@ -120,7 +120,13 @@ restrictions.
If working under the effect of the C<use utf8;> pragma, the following
rules apply:
- / (?[ ( \p{Word} & \p{XID_Start} ) + [_] ]) \p{XID_Continue}* /x
+ / (?[ ( \p{Word} & \p{XID_Start} ) + [_] ])
+ (?[ ( \p{Word} & \p{XID_Continue} ) ]) * /x
+
+That is, a "start" character followed by any number of "continue"
+characters. Perl requires every character in an identifier to also
+match C<\w> (this prevents some problematic cases); and Perl
+additionally accepts identfier names beginning with an underscore.
If not under C<use utf8>, the source is treated as ASCII + 128 extra
controls, and identifiers should match