Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
$/ is now per-routine
  • Loading branch information
TimToady committed Jul 7, 2011
1 parent 1a67e98 commit 08f2ce9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions S05-regex.pod
Expand Up @@ -17,8 +17,8 @@ Synopsis 5: Regexes and Rules

Created: 24 Jun 2002

Last Modified: 9 Feb 2011
Version: 144
Last Modified: 9 Jul 2011
Version: 145

This document summarizes Apocalypse 5, which is about the new regex
syntax. We now try to call them I<regex> rather than "regular
Expand Down Expand Up @@ -2671,7 +2671,8 @@ the regex containing the C<||>.

A match always returns a C<Match> object, which is also available
as C<$/>, which is a dynamic lexical declared in the outer
block that is calling the regex. (A regex declares its own
routine that is calling the regex. (A named C<regex>, C<token>,
or C<rule> is a routine, and hence declares its own
lexical C<$/> variable, which always refers to the most recent
submatch within the rule, if any.) The current match state is
kept in the regex's C<$¢> variable which will eventually get
Expand Down

0 comments on commit 08f2ce9

Please sign in to comment.