From: Karl Williamson Date: Sun, 28 Mar 2010 05:06:59 +0000 (-0600) Subject: Clarify that some examples are for ASCII machines X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f5650a8ec47c75b463d95214aa5d6d9d837290e;p=p5sagit%2Fp5-mst-13.2.git Clarify that some examples are for ASCII machines --- diff --git a/pod/perlrebackslash.pod b/pod/perlrebackslash.pod index 148f6ee..4ce2796 100644 --- a/pod/perlrebackslash.pod +++ b/pod/perlrebackslash.pod @@ -264,7 +264,7 @@ as a character without special meaning by the regex engine, and will match Mnemonic: heIadecimal. -=head4 Examples +=head4 Examples (assuming an ASCII platform) $str = "Perl"; $str =~ /\x50/; # Match, "\x50" is "P". diff --git a/pod/perlrequick.pod b/pod/perlrequick.pod index 7abd895..4b5e19a 100644 --- a/pod/perlrequick.pod +++ b/pod/perlrequick.pod @@ -85,8 +85,8 @@ for a carriage return. Arbitrary bytes are represented by octal escape sequences, e.g., C<\033>, or hexadecimal escape sequences, e.g., C<\x1B>: - "1000\t2000" =~ m(0\t2) # matches - "cat" =~ /\143\x61\x74/ # matches, but a weird way to spell cat + "1000\t2000" =~ m(0\t2) # matches + "cat" =~ /\143\x61\x74/ # matches in ASCII, but a weird way to spell cat Regexes are treated mostly as double quoted strings, so variable substitution works: diff --git a/pod/perlretut.pod b/pod/perlretut.pod index 2798f68..0ff7438 100644 --- a/pod/perlretut.pod +++ b/pod/perlretut.pod @@ -184,7 +184,7 @@ bytes. Here are some examples of escapes: "1000\t2000" =~ m(0\t2) # matches "1000\n2000" =~ /0\n20/ # matches "1000\t2000" =~ /\000\t2/ # doesn't match, "0" ne "\000" - "cat" =~ /\143\x61\x74/ # matches, but a weird way to spell cat + "cat" =~ /\143\x61\x74/ # matches in ASCII, but a weird way to spell cat If you've been around Perl a while, all this talk of escape sequences may seem familiar. Similar escape sequences are used in double-quoted