@@ -401,8 +401,6 @@ dynamic variable using L<the * twigil|#The_*_Twigil>.
401
401
402
402
= head2 The C < state > Declarator
403
403
404
- = head2 The C < state > Declarator
405
-
406
404
= head2 The C < augment > Declarator
407
405
408
406
= head2 The C < supersede > Declarator
@@ -413,6 +411,11 @@ dynamic variable using L<the * twigil|#The_*_Twigil>.
413
411
414
412
= head1 Special Variables
415
413
414
+ Perl 5 is infamous for its many obscure special variables. Perl 6 also
415
+ has special variables, but only has three that are extra short because
416
+ of how often they're used. Other special variables have longer, more
417
+ descriptive names.
418
+
416
419
= head2 Often-Used Variables
417
420
418
421
= comment TODO: find a better heading
@@ -429,7 +432,7 @@ There are three special variables that are available in every block:
429
432
430
433
= end table
431
434
432
- = head3 C < $_ >
435
+ = head3 The C < $_ > Variable
433
436
434
437
C < $_ > is the topic variable. It is the default parameter for blocks that do
435
438
not have an explicit signature, so constructs like C < for @array { ... } >
@@ -463,7 +466,7 @@ This outputs:
463
466
d$e
464
467
ij*
465
468
466
- = head3 C < $/ >
469
+ = head3 The C < $/ > Variable
467
470
468
471
C < $/ > is the match variable. It stores the result of each regex match, and
469
472
usually contains objects of type L < Match > .
@@ -480,7 +483,7 @@ Other match variables are aliases to elements of C<$/>:
480
483
$1 # same as $/[1]
481
484
$<named> # same as $/<named>
482
485
483
- = head3 C < $! >
486
+ = head3 The C < $! > Variable
484
487
485
488
C < $! > is the error variable. If a C < try > block or statement prefix catches
486
489
an exception, that exception is stored in C < $! > . If no exception was caught,
0 commit comments