- Timestamp:
- 09/28/08 23:00:50 (2 months ago)
- Location:
- docs/tutorial
- Files:
-
- 3 modified
-
ch04_basic_syntax.pod (modified) (1 diff)
-
ch05_subroutines.pod (modified) (15 diffs)
-
ch07_grammars.pod (modified) (28 diffs)
Legend:
- Unmodified
- Added
- Removed
-
docs/tutorial/ch04_basic_syntax.pod
r22436 r22445 466 466 a boolean context, no matter what the actual value is. This particular 467 467 property means the Perl 6 C<run> call can be checked with a simple 468 conditional. It still returns the same numeric values it always has (0469 on success and a numeric error code on failure), but it flags the 470 value with a property as true when the call succeeds and false when it 471 fa ils.468 conditional. It still returns the same numeric values as its Perl 5 469 equivalent C<system> did (0 on success and a numeric error code on failure), 470 but it flags the value with a property as true when the call succeeds and 471 false when it fails. 472 472 473 473 Properties and traits can also store a value. Both C<constant> and -
docs/tutorial/ch05_subroutines.pod
r22302 r22445 30 30 Blocks of reusable code can also be called the "methods" of a particular 31 31 class of object. Methods have a few significant differences from 32 subroutines, a few significant differences from those found in Perl 5.32 subroutines, and a few significant differences from those found in Perl 5. 33 33 For instance, in Perl 6 they're distinguished by a separate keyword, 34 34 C<method>. Because of these differences, they'll be discussed in … … 73 73 X<subroutines;parameters> 74 74 One of the most significant additions to subroutines in Perl 6 is 75 namedformal parameters. The parameter list, often called the75 formal parameters. The parameter list, often called the 76 76 I<signature> of the subroutine, is part of the subroutine declaration: 77 77 … … 135 135 for the average programmer, Perl 6 also allows optional parameters. 136 136 Optional parameters can be included or ignored without causing any 137 errors. Each optional parameter is marked with a C<?> beforethe137 errors. Each optional parameter is marked with a C<?> after the 138 138 parameter name: 139 139 140 sub someopt ($required1, $required2, ?$optional1, ?$optional2) {140 sub someopt ($required1, $required2, $optional1?, $optional2?) { 141 141 ... 142 142 } … … 243 243 sub transport (:$planet, *%flags) {...} 244 244 245 transport( 'name' => 'Arthur',246 'luggage' => 'lost',247 'planet' => 'Magrathea',248 'towel' => 'required');245 transport(:name('Arthur'), 246 :luggage('lost'), 247 :planet('Magrathea'), 248 :towel('required')); 249 249 250 250 When they're combined with other kinds of parameters, variadic … … 268 268 optional, named, or variadic parameters: 269 269 270 sub typedparams (Int $first, Str ?$second) {...}270 sub typedparams (Int $first, Str $second?) {...} 271 271 272 272 The parameter type declares the type of argument that can be bound to … … 322 322 if the call doesn't pass an argument for that parameter. 323 323 324 sub default_vals ($required, ?$optional= 5) {...}324 sub default_vals ($required, $optional? = 5) {...} 325 325 326 326 Default values are only used with optional parameters. This should make … … 410 410 optional parameters: 411 411 412 sub namedparams ($first, ?$second, ?$thirdis rw) {...}412 sub namedparams ($first, $second?, $third? is rw) {...} 413 413 414 414 namedparams(third => 'Trillian', first => $name); … … 426 426 To get the Perl 5-style behavior where the elements of an array (or 427 427 the pairs of a hash) flatten out into the parameter list, use the 428 flattening operator C< *> in the call to the subroutine. Here,428 flattening operator C<|> in the call to the subroutine. Here, 429 429 C<$first> binds to C<@array[0]> and C<$second> binds to C<@array[1]>: 430 430 431 431 sub flat ($first, $second) {...} 432 432 433 flat( *@array);433 flat(|@array); 434 434 435 435 A flattened hash argument acts as a list of pairs, which are bound to … … 438 438 C<%hash{'second'}>: 439 439 440 sub flat_hash ( $first,$second) {...}440 sub flat_hash (:$first, :$second) {...} 441 441 442 442 443 443 %hash = (first => 1, second => 2); 444 flat_hash( *%hash);444 flat_hash(|%hash); 445 445 446 446 Flattened hash arguments are useful for building up hashes of named … … 489 489 array: 490 490 491 sub mixed ($req, ?$opt, ?$another, *@slurpy) {...}491 sub mixed ($req, $opt?, $another?, *@slurpy) {...} 492 492 493 493 mixed('a', 'opt' => 1, 'b', 'c', 'd', 'e'); … … 511 511 array with or without any named arguments in the call: 512 512 513 sub mixed ($req, +$opt, +$another, *@slurpy) {...}513 sub mixed ($req, $opt?, $another?, *@slurpy) {...} 514 514 515 515 mixed('a', 'opt' => 1, 'b', 'c', 'd', 'e'); … … 524 524 X<subroutines;stub> 525 525 To declare a subroutine without defining it you give it a body 526 consisting of nothing but the C<...> (or "yada, yada, yada") operator. 526 consisting of nothing but the C<...> (or "yada, yada, yada") operator, 527 optionally followed by a message. 527 528 So, all the preceding examples that look like pseudocode with C<{...}> 528 529 for their body are actually valid subroutine declarations. 529 530 530 sub stubbly (Str $name, Int ?$days) {...} 531 sub stubbly (Str $name, Int $days?) {...} 532 533 You can include a message that appears in the error message if you try to 534 execute a stu subroutine. 535 536 sub stubbly (Str $name, Int $days?) { ... "Don't call me" } 531 537 532 538 When you later define the subroutine, the signature and defined traits 533 539 must exactly match the declaration. 534 540 535 sub stubbly (Str $name, Int ?$days) {541 sub stubbly (Str $name, Int $days?) { 536 542 print "$name hasn't shaved in $days day"; 537 543 print "s" if $days > 1; … … 651 657 subroutine. 652 658 653 $make_tea = sub ($tealeaves, ?$sugar, ?$milk) {...}654 655 The arrow operator used with C<for> and C<given> is just a notherway656 of defining anonymous subroutines. The arrow doesn't require659 $make_tea = sub ($tealeaves, :$sugar, :$milk) {...} 660 661 The arrow operator used with C<for> and C<given> is just a way 662 of defining anonymous blocks. The arrow doesn't require 657 663 parentheses around its parameter list. It can't declare named subs, 658 664 and can't declare a return type. 659 665 660 $make_tea = -> $tealeaves, ?$sugar, ?$milk {...}666 $make_tea = -> $tealeaves, :$sugar, :$milk {...} 661 667 662 668 X<blocks;bare> … … 672 678 673 679 674 You can't use the C<return> statement within an arrow subor bare675 block sub to return from an anonymous sub. Blocks and arrow subs are680 You can't use the C<return> statement within an arrow block or bare 681 block sub to return from that block. Blocks and arrow subs are 676 682 commonly used for ordinary control flow, so C<return> ignores them and 677 683 only returns from subroutines defined with C<sub> keyword or 678 684 methods. 685 686 Instead you can C<leave> a block: 687 688 my $make_tea { 689 leave unless teamtime(); 690 my $tea = boil 'tealeaves'; 691 combine $tea, 'sugar', 'milk'; 692 } 693 694 The simple rule is that everything declared with a C<sub> or C<method> 695 keyword use the C<return> statement, blocks declared without such a keyword 696 can use C<leave>. 679 697 680 698 =head1 Multi Subroutines … … 711 729 This version of C<add> will dispatch based on the types of the first 712 730 two arguments passed in, and ignore the type of the third. 731 732 Multisubs can also differ in the number of arguments as long as no 733 ambiguities arise. 713 734 714 735 =head1 Curried Subroutines -
docs/tutorial/ch07_grammars.pod
r22304 r22445 3 3 =pod 4 4 5 =head0 Grammars and Rules 5 =head0 Grammars and Regexes 6 7 8 TODO: This chapter is outdated in some ways 9 10 * It uses the old word "rule" instead of "regex" in far too many places 11 * The interpolation rules are outdated 12 * <'...'> and <"..."> are now '...' and "..." 13 * some of the assertion syntax has changed, for example <foo()> means 14 something different now 15 * Modifiers: explain :sigspace and :ratchet modifiers 16 * Modifiers: :u1, :u2... are now :bytes, :codes, :graphemes etc. 17 * Other missing modifiers: :overlap, :ignoreaccent 18 * The match object needs explanation 6 19 7 20 Z<CHP-7> 8 21 9 X<r ules;grammars and>10 X<grammars and r ules>22 X<regexes;grammars and> 23 X<grammars and regexes> 11 24 X<regular expressions> 12 25 Perl 6 "regular expressions" are so far beyond the formal definition 13 of regular expressions that we decided it was time for a more 14 meaningful name.N<Regular expressions describe regular languages, and 26 of regular expressions that we don't use that name anymore, but simply 27 stick to the abbreviation I<Regex>.N<Regular expressions describe regular 28 languages, and 15 29 consist of three primitives and a limited set of operations (three or 16 30 so, depending on the formulation). So, even Perl 5 "regular 17 expressions" weren't formal regular expressions.> We now call them 18 "rules." Perl 6 rules bring the full power of recursive descent 19 parsing to the core of Perl, but are comfortably useful even if you 31 expressions" weren't formal regular expressions.> 32 Perl 6 regexes bring the full power of recursive descent 33 parsingN<A computer scientist would classify the most common usage of Perl 6 34 regexes as I<deterministic context-free languages>> to the core of Perl, but are comfortably useful even if you 20 35 don't know anything about recursive descent parsing. In the usual 21 case, all you'll ever need to know is that r ules are X<patterns>36 case, all you'll ever need to know is that regexes are X<patterns> 22 37 patterns for matching text. 23 38 24 =head1 Using R ules39 =head1 Using Regexes 25 40 26 41 Z<CHP-7-SECT-1> 27 42 28 X<r ules;syntax>29 R ules are a language within a language, with their own syntax and43 X<regexes;syntax> 44 Regexes are a language within a language, with their own syntax and 30 45 conventions. At the highest level, though, they're just another set of 31 Perl constructs. So the first thing to learn about r ules is the Perl46 Perl constructs. So the first thing to learn about regexes is the Perl 32 47 "glue" code for creating and using them. 33 48 … … 36 51 Z<CHP-7-SECT-1.1> 37 52 38 The simplest way to create and use a r ule is an immediate match. A rule53 The simplest way to create and use a regex is an immediate match. A regex 39 54 defined with the C<m//>X<m// (match) operator> operator always 40 55 immediately matches. Substitutions, defined with the C<s///> 41 56 X<s/// (substitution) operator> operator also immediately match. A 42 r uledefined with the C<//>X</ (slash);//;;(see m// operator)>57 regex defined with the C<//>X</ (slash);//;;(see m// operator)> 43 58 operator immediately matches when it's in void, boolean, string, or 44 59 numeric context, or the argument of the smart-match operator (C<~~>). 45 60 X<~ (tilde);~~ (smart match) operator> 46 61 47 if $string ~~ m/ \w+/ {...}48 if $string ~~ s/ \w+/word/ {...}49 if $string ~~ / \w+/ {...}62 if $string ~~ m/ \w+ / {...} 63 if $string ~~ s/ \w+ /word/ {...} 64 if $string ~~ / \w+ / {...} 50 65 51 66 You can substitute other delimiters, like C<#...#>, C<[...]>, and … … 85 100 86 101 Sometimes you want a little more flexibility than an immediate match. 87 The C<rx//>X<rx// (anonymous r ule) operator> operator defines an88 anonymous r ulethat can be executed later.102 The C<rx//>X<rx// (anonymous regex) operator> operator defines an 103 anonymous regex that can be executed later. 89 104 90 105 $digits = rx/\d+/; 91 106 92 The simple C<//> operator also defines an anonymous r ulein all107 The simple C<//> operator also defines an anonymous regex in all 93 108 contexts other than void, boolean, string, or numeric, or as an 94 109 argument of C<~~>. 95 110 96 $digits = /\d+/; # store r ule111 $digits = /\d+/; # store regex 97 112 98 113 You can use the unary context forcing operators, C<+>, C<?>, and C<~>, … … 107 122 $string = ~/^\w+/; # match $_ and return string 108 123 109 Another option for deferred matches is a C<r ule> block. The C<rule>110 keyword defines a named or anonymous r ule, in much the same way that124 Another option for deferred matches is a C<regex> block. The C<regex> 125 keyword defines a named or anonymous regex, in much the same way that 111 126 C<sub> declares a subroutine or C<method> declares a method. But the 112 code within the block of a C<rule> is rule syntax, not Perl syntax. 113 114 $digits = rule {\d+}; 115 116 rule digits {\d+} 117 118 To match a named or anonymous rule, call it as a subrule within 119 another rule. Subrules, whether they're named rules or a variable 120 containing an anonymous rule, are enclosed in assertion delimiters 127 code within the block of a C<regex> is regex syntax, not Perl syntax. 128 129 $digits = regex {\d+}; 130 131 regex digits {\d+} 132 133 There are two more keywords that defines regexes similarly to C<regex>, but 134 they imply different modifiers. C<token> introduces a regex that does 135 not backtrack,N<technically it implies the C<:ratchet> modifier> (more details 136 on that below; for now it's enough to know that it matches simple regexes 137 faster), and C<rule> is the same as C<token> except that whitespaces in 138 regexes also match optional whitespaces in the string.N<it implies both the 139 C<:ratchet> and the C<:sigspace> modifer>. 140 141 To match a named or anonymous regex, call it as a subregex within 142 another regex. Subregexes, whether they're named regexes or a variable 143 containing an anonymous regex, are enclosed in assertion delimiters 121 144 C<< <...> >>. You can read more about assertions in A<CHP-7-SECT-2.4> 122 145 "Assertions" later in this chapter. … … 166 189 =cell C</.../> 167 190 168 =cell Immediately match or define an anonymous r ule, depending on the191 =cell Immediately match or define an anonymous regex, depending on the 169 192 context. 170 193 171 194 =row 172 195 173 =cell C<r ule{...}>174 175 =cell Define an anonymous r ule.176 177 =row 178 179 =cell C<r ulename {...}>180 181 =cell Define a named r ule.196 =cell C<regex {...}> 197 198 =cell Define an anonymous regex. 199 200 =row 201 202 =cell C<regex name {...}> 203 204 =cell Define a named regex. 182 205 183 206 =end table … … 189 212 X<grammars> 190 213 191 A grammar is a collection of r ules, in much the same way that a class is214 A grammar is a collection of regexes, in much the same way that a class is 192 215 a collection of methods. In fact, grammars are classes, they're just 193 classes that inherit from the universal base class C<R ule>X<Ruleclass>.216 classes that inherit from the universal base class C<Regex>X<Regex class>. 194 217 This means that grammars can inherit from other grammars, and that they 195 define a namespace for their r ules.218 define a namespace for their regexes. 196 219 197 220 grammar Hitchhikers { 198 rule name {Zaphod|Ford|Arthur}221 token name { Zaphod | Ford | Arthur } 199 222 200 rule id {\d+}223 token id { \d+ } 201 224 202 225 ... 203 226 } 204 227 205 Any r ulein the current grammar or in one of its parents can be called206 directly, but a r ulefrom an external grammar needs to have its package228 Any regex in the current grammar or in one of its parents can be called 229 directly, but a regex from an external grammar needs to have its package 207 230 specified: 208 231 209 if $newsrelease ~~ / E<lt>Hitchhikers.nameE<gt>/ {232 if $newsrelease ~~ / E<lt>Hitchhikers.nameE<gt> / { 210 233 send_alert($1); 211 234 } 212 235 213 If you want to match against the entire grammar, you can define a r ule236 If you want to match against the entire grammar, you can define a regex 214 237 C<TOP> in that grammar. 215 238 216 239 grammar Hitchhikers { 217 r uleTOP { <name> <id> }240 regex TOP { <name> <id> } 218 241 ... 219 242 } … … 235 258 236 259 Every language has a set of basic components (words or parts of words) 237 and a set of syntax rules for combining them. The "words" in r ules are260 and a set of syntax rules for combining them. The "words" in regexes are 238 261 literal characters (or symbols), some X<metacharacters> metacharacters 239 (or metasymbols), and X<r ules;escape sequences>X<escape sequences,240 r ules> escape sequences, while the combining syntax includes other241 metacharacters, X<quantifiers, r ules> X<rules;quantifiers> quantifiers,262 (or metasymbols), and X<regexes;escape sequences>X<escape sequences, 263 regexes> escape sequences, while the combining syntax includes other 264 metacharacters, X<quantifiers, regexes> X<regexes;quantifiers> quantifiers, 242 265 bracketing characters, and assertions. 243 266 … … 250 273 C<.> matches any single character, even a newline character. Actually, 251 274 what it matches by default is a Unicode grapheme, but you can change 252 that behavior with a pragma in your code, or a modifier on the r ule.275 that behavior with a pragma in your code, or a modifier on the regex. 253 276 We'll talk more about modifiers in A<CHP-7-SECT-2.5>"Modifiers" later 254 277 in this chapter. The C<^> and C<$> metacharacters are zero-width … … 264 287 C<#> marks a comment to the end of the line. Whitespace insensitivity 265 288 (the old C</x> modifier) is on by default, so you can start a comment at 266 any point on any line in a r ule. Just make sure you don't comment out267 the symbol that terminates the r ule. The C<:=>268 X<: (colon);:= (binding);in r ules> binds a hypothetical variable to269 the result of a subr uleor grouped pattern. Hypotheticals are covered289 any point on any line in a regex. Just make sure you don't comment out 290 the symbol that terminates the regex. The C<:=> 291 X<: (colon);:= (binding);in regex> binds a hypothetical variable to 292 the result of a subregex or grouped pattern. Hypotheticals are covered 270 293 in A<CHP-7-SECT-5>"Hypothetical Variables" later in this chapter. 271 294 272 295 The metacharacters C<()>, C<[]>, C<{}> and C<E<lt>E<gt>> are bracketing 273 pairs. The pairs always have to be balanced within the r ule, unless they296 pairs. The pairs always have to be balanced within the regex, unless they 274 297 are literal characters (escaped with a C<\>). The brackets C<()> and 275 298 C<[]> group patterns to match as a single atom. They're often used to … … 277 300 of patterns with a quantifier, among other things. Parentheses C<()> are 278 301 capturing and square brackets C<[]> are non-capturing. The C<{}> 279 brackets define a section of Perl code (a closure) within a r ule. These302 brackets define a section of Perl code (a closure) within a regex. These 280 303 closures are always a successful zero-width match, unless the code 281 304 explicitly calls the C<fail> function. The C<E<lt>...E<gt>> brackets … … 305 328 306 329 =cell Match any single character, including a newline. 307 X<. (dot);. match single character (r ules)>330 X<. (dot);. match single character (regexes)> 308 331 309 332 =row … … 312 335 313 336 =cell Match the beginning of a string. 314 X<^ (caret);^ beginning of string (r ules)>337 X<^ (caret);^ beginning of string (regexes)> 315 338 316 339 =row … … 319 342 320 343 =cell Match the end of a string. 321 X<$ (dollar sign);$ end of string (r ules)>344 X<$ (dollar sign);$ end of string (regexes)> 322 345 323 346 =row … … 326 349 327 350 =cell Match the beginning of a line. 328 X<^ (caret);^^ beginning of line (r ules)>351 X<^ (caret);^^ beginning of line (regexes)> 329 352 330 353 =row … … 333 356 334 357 =cell Match the end of a line. 335 X<$ (dollar sign);$$ end of line (r ules)>358 X<$ (dollar sign);$$ end of line (regexes)> 336 359 337 360 =row … … 353 376 =cell Escape a metacharacter to get a literal character, or escape a 354 377 literal character to get a metacharacter. 355 X<\ (backslash);\ escape sequences (r ules)>356 X<\ (backslash);\ to escape metacharacters (r ules)>378 X<\ (backslash);\ escape sequences (regexes)> 379 X<\ (backslash);\ to escape metacharacters (regexes)> 357 380 358 381 =row … … 367 390 368 391 =cell Bind the result of a match to a hypothetical variable. 369 X<: (colon);:= (binding);in r ules>392 X<: (colon);:= (binding);in regexes> 370 393 371 394 =row … … 385 408 =cell C<{...}> 386 409 387 =cell Execute a closure (Perl 6 code) within a r ule.410 =cell Execute a closure (Perl 6 code) within a regex. 388 411 389 412 =row … … 400 423 Z<CHP-7-SECT-2.2> 401 424 402 X<escape sequences, r ules>403 X<r ules;escape sequences>404 X<\ (backslash);\ escape sequences (r ules)>425 X<escape sequences, regexes> 426 X<regexes;escape sequences> 427 X<\ (backslash);\ escape sequences (regexes)> 405 428 The escape sequences are literal characters acting as metacharacters, 406 429 marked with the C<\> escape. Some escape sequences represent single … … 412 435 brackets, C<()>, C<{}>, and C<E<lt>E<gt>> work in place of C<[]>. 413 436 414 X<variable interpolation in r ules>415 X<r ules;variable interpolation>437 X<variable interpolation in regexes> 438 X<regexes;variable interpolation> 416 439 Note that since an ordinary variable now interpolates as a literal 417 string by default, the C<\Q> escape sequenceis rarely needed.418 419 A<CHP-7-TABLE-3>Table 7-3 shows the escape sequences for r ules.440 string by default, the C<\Q> escape is rarely needed. 441 442 A<CHP-7-TABLE-3>Table 7-3 shows the escape sequences for regexes. 420 443 421 444 =begin table picture Escape sequences … … 625 648 match. 626 649 627 X<. (dot);.. (range);quantifier (rules)> 628 X<. (dot);... (infinite range);quantifier (rules)> 629 The numeric quantifiers use assertion syntax. A single number 630 (C<E<lt>3E<gt>>) requires exactly that many matches. A numeric range 631 quantifier (C<E<lt>3C<..>5E<gt>>) succeeds if the number of matches is 632 between the minimum and maximum numbers. A range with three trailing 633 dots (C<E<lt>2...E<gt>>) is shorthand for C<E<lt>R<n>..InfE<gt>> and 634 matches as many times as possible. 650 X<. (dot);.. (range);quantifier (regexes)> 651 X<. (dot);... (infinite range);quantifier (regexes)> 652 The numeric quantifiers use the C<**> operator followed by the number of 653 desired matches. For a range of matches you can use a closure that returns 654 a range (C<a**{2..4}> matches two to four C<a>'s, (C<a**{2..Inf}>) two or 655 more C<a>'s). 635 656 636 657 Each quantifier has a minimal alternate form, marked with a trailing … … 683 704 =row 684 705 685 =cell C <E<lt>>R<n>C<E<gt>>686 687 =cell C< E<lt>>R<n>C<E<gt>?>706 =cell C**n> 707 708 =cell C<**?n> 688 709 689 710 =cell Match exactly R<n> times. … … 691 712 =row 692 713 693 =cell C<E<lt>>R<n>C<..>R<m>C<E<gt>> 694 695 =cell C<E<lt>>R<n>C<..>R<m>C<E<gt>?> 714 =cell C<**{n..m}> 715 =cell C<**?{n..m}> 696 716 697 717 =cell Match at least R<n> and no more than R<m> times. … … 712 732 Z<CHP-7-SECT-2.4> 713 733 714 X<assertions, r ules>715 X<r ules;assertions>734 X<assertions, regexes> 735 X<regexes;assertions> 716 736 In general, an assertion simply states that some condition or state is 717 737 true and the match fails when that assertion is false. Many different 718 738 constructs with many different purposes use assertion syntax. 719 739 720 X<variable interpolation in r ules>740 X<variable interpolation in regexes> 721 741 X<rules;variable interpolation> 722 Assertions match named and anonymous r ules, arrays or hashes containing723 anonymous r ules, and subroutines or closures that return anonymous724 r ules. You have to enclose a variable in assertion delimiters to get it742 Assertions match named and anonymous regexes, arrays or hashes containing 743 anonymous regexes, and subroutines or closures that return anonymous 744 regexes. You have to enclose a variable in assertion delimiters to get it 725 745 to interpolate as an anonymous rule or rules. A bare scalar in a pattern 726 746 interpolates as a literal string, while a scalar variable in assertion … … 977 997 =row 978 998 979 =cell C<:W>980 981 =cell982 983 =cell Turn off intelligent whitespace matching (return to default).984 985 =row986 987 999 =cell 988 1000 … … 1059 1071 =row 1060 1072 1061 =cell 1062 1063 =cell C<: p5>1073 =cell C<:P5> 1074 1075 =cell C<:Perl5> 1064 1076 1065 1077 =cell The pattern uses Perl 5 regex syntax. … … 1242 1254 Hypothetical variables are a powerful way of building up data structures 1243 1255 from within a match. Ordinary captures with C<()> store the result of 1244 the captures in C<$ 1>, C<$2>, etc. The values stored in these variables1256 the captures in C<$0>, C<$1>, etc. The values stored in these variables 1245 125
