@@ -1112,18 +1112,22 @@ short.
1112
1112
1113
1113
=head2 Pre-defined lexical variables
1114
1114
1115
- There are three special variables that are always available:
1115
+ There are four special variables that are always available:
1116
1116
1117
1117
=begin table
1118
1118
1119
1119
Variable Meaning Scope
1120
1120
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
1124
1125
1125
1126
=end table
1126
1127
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
+
1127
1131
X<|Language,topic variable>
1128
1132
=head3 The C<$_> variable
1129
1133
@@ -1295,6 +1299,11 @@ the block to the caught exception.
1295
1299
Also note that the same thread-safety issues apply to the use of C<$!> as
1296
1300
they do to C<$/>.
1297
1301
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
+
1298
1307
X<|Variables,$?FILE>X<|Variables,$?LINE>X<|Variables,::?CLASS>
1299
1308
1300
1309
=head2 Compile-time variables
0 commit comments