I just submitted a PR based on this useful thread.
https://github.com/Raku/doc/pull/3942
Thanks to you both!
(Also, apparently $:a has the same behavior – after the first time, you
can use $a )
On Mon, Aug 09, 2021 at 01:00:52PM -0700, Joseph Brenner wrote:
> There's this much:
>
> https://docs.raku.org/language/variables#index-entry-$$CIRCUMFLEX_ACCENT
>
> > If you have self-declared a parameter using $^a once, you may refer to it
> > using only $a thereafter.
>
> But it doesn't go a
There's this much:
https://docs.raku.org/language/variables#index-entry-$$CIRCUMFLEX_ACCENT
> If you have self-declared a parameter using $^a once, you may refer to it
> using only $a thereafter.
But it doesn't go anywhere near far enough. You *had better* to
refer to it as $a or you'll get s
Okay, so my central confusion here has to do with not
understanding that the caret gets used *only once* in
a construct like this:
my $cb = {
do if ($^a eq $^b) {
"$a";
} else {
"$a & $b";
}
};
say $cb( 'a', 'b' );
After $^a is used,