Skip to content

Commit d9202ea

Browse files
authored
Add $¢ to the list of always available lexical var (#4459)
* Add $¢ to the list of always available lexical var
1 parent 9642d38 commit d9202ea

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

doc/Language/variables.rakudoc

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,18 +1112,22 @@ short.
11121112

11131113
=head2 Pre-defined lexical variables
11141114

1115-
There are three special variables that are always available:
1115+
There are four special variables that are always available:
11161116

11171117
=begin table
11181118

11191119
Variable Meaning Scope
11201120

1121-
$_ topic variable every block
1122-
$/ regex match every sub / method
1123-
$! exceptions every sub / method
1121+
$_ topic variable every block
1122+
$/ regex match every sub / method
1123+
$! exceptions every sub / method
1124+
$¢ last match (similar to $/) inside current regex
11241125

11251126
=end table
11261127

1128+
I<Note that while you can access C<$¢> without error anywhere, it will
1129+
contain C<Nil> if accessed outside of a regex>.
1130+
11271131
X<|Language,topic variable>
11281132
=head3 The C<$_> variable
11291133

@@ -1295,6 +1299,11 @@ the block to the caught exception.
12951299
Also note that the same thread-safety issues apply to the use of C<$!> as
12961300
they do to C<$/>.
12971301

1302+
X<|Language,cursor variable>
1303+
=head3 The C<$¢> variable
1304+
1305+
See the description in L<Match|/type/Match#index-entry-$%C2%A2-$%C2%A2>.
1306+
12981307
X<|Variables,$?FILE>X<|Variables,$?LINE>X<|Variables,::?CLASS>
12991308

13001309
=head2 Compile-time variables

0 commit comments

Comments
 (0)