See Original text in context
In addition, there's an Associative anonymous state variable %
.
sub foo()foo() for ^3;# OUTPUT: «{0 => 0}# {0 => 0, 1 => 1}# {0 => 0, 1 => 1, 2 => 2}»
The same caveat about disambiguation applies. As you may expect, indexed access is also possible (with copying to make it useful).
sub foo()foo() for ^3;# OUTPUT: «{0 => 0}# {0 => 0, 1 => 1}# {0 => 0, 1 => 1, 2 => 2}»
As with the other anonymous state variables, each mention of %
within a given scope will effectively introduce a separate variable.