From: Perl 5 Porters Date: Fri, 20 Sep 1996 14:08:33 +0000 (+0100) Subject: perl 5.003_06: pod/perlre.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f36ee90980e6a3d72130080445d39d089f72222;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_06: pod/perlre.pod Date: Wed, 11 Sep 1996 11:55:18 -0500 From: "Daniel S. Lewart" Subject: POD spelling patches Date: Fri, 20 Sep 1996 15:08:33 +0100 (BST) From: "Joseph S. Myers" Subject: Pod typos, pod2man bugs, and miscellaneous installation comments Here is a patch for various typos and other defects in the Perl 5.003_05 pods, including the pods embedded in library modules. Date: Fri, 4 Oct 1996 10:36:19 -0400 (EDT) From: Kenneth Albanowski Subject: Re: Suggestion for improving man page Add alternative names for various escape sequences. --- diff --git a/pod/perlre.pod b/pod/perlre.pod index 6d21a65..55dc120 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -100,12 +100,12 @@ Note that the meanings don't change, just the "gravity": Since patterns are processed as double quoted strings, the following also work: - \t tab - \n newline - \r return - \f form feed - \a alarm (bell) - \e escape (think troff) + \t tab (HT, TAB) + \n newline (LF, NL) + \r return (CR) + \f form feed (FF) + \a alarm (bell) (BEL) + \e escape (think troff) (ESC) \033 octal char (think of a PDP-11) \x1B hex char \c[ control char @@ -148,11 +148,11 @@ C modifier is used, while "^" and "$" will match at every internal line boundary. To match the actual end of the string, not ignoring newline, you can use C<\Z(?!\n)>. -When the bracketing construct C<( ... )> is used, \ matches the +When the bracketing construct C<( ... )> is used, \EdigitE matches the digit'th substring. Outside of the pattern, always use "$" instead of "\" -in front of the digit. (While the \ notation can on rare occasion work +in front of the digit. (While the \EdigitE notation can on rare occasion work outside the current pattern, this should not be relied upon. See the -WARNING below.) The scope of $ (and C<$`>, C<$&>, and C<$'>) +WARNING below.) The scope of $EdigitE (and C<$`>, C<$&>, and C<$'>) extends to the end of the enclosing BLOCK or eval string, or to the next successful pattern match, whichever comes first. If you want to use parentheses to delimit a subpattern (e.g. a set of alternatives) without @@ -167,7 +167,7 @@ same as \010, a backspace, and \11 the same as \011, a tab. And so on. (\1 through \9 are always backreferences.) C<$+> returns whatever the last bracket match matched. C<$&> returns the -entire matched string. ($0 used to return the same thing, but not any +entire matched string. (C<$0> used to return the same thing, but not any more.) C<$`> returns everything before the matched string. C<$'> returns everything after the matched string. Examples: @@ -182,7 +182,7 @@ everything after the matched string. Examples: You will note that all backslashed metacharacters in Perl are alphanumeric, such as C<\b>, C<\w>, C<\n>. Unlike some other regular expression languages, there are no backslashed symbols that aren't alphanumeric. -So anything that looks like \\, \(, \), \<, \>, \{, or \} is always +So anything that looks like \\, \(, \), \E, \E, \{, or \} is always interpreted as a literal character, not a metacharacter. This makes it simple to quote a string that you want to use for a pattern but that you are afraid might contain metacharacters. Simply quote all the @@ -211,7 +211,7 @@ whitespace formatting, a simple C<#> will suffice. =item (?:regexp) -This groups things like "()" but doesn't make backrefences like "()" does. So +This groups things like "()" but doesn't make backreferences like "()" does. So split(/\b(?:a|b|c)\b/) @@ -235,7 +235,7 @@ use this for lookbehind: C will not find an occurrence of "bar" that is preceded by something which is not "foo". That's because the C<(?!foo)> is just saying that the next thing cannot be "foo"--and it's not, it's a "bar", so "foobar" will match. You would have to do -something like C for that. We say "like" because there's +something like C for that. We say "like" because there's the case of your "bar" not having three characters before it. You could cover that this way: C. Sometimes it's still easier just to say: @@ -476,7 +476,7 @@ Characters may be specified using a metacharacter syntax much like that used in C: "\n" matches a newline, "\t" a tab, "\r" a carriage return, "\f" a form feed, etc. More generally, \I, where I is a string of octal digits, matches the character whose ASCII value is I. -Similarly, \xI, where I are hexidecimal digits, matches the +Similarly, \xI, where I are hexadecimal digits, matches the character whose ASCII value is I. The expression \cI matches the ASCII character control-I. Finally, the "." metacharacter matches any character except "\n" (unless you use C).