Look up ..^ which is the long form of ^ when used in ^8 sort of thing

https://docs.raku.org/routine/..$CIRCUMFLEX_ACCENT

"Constructs a Range <https://docs.raku.org/type/Range> from the arguments,
excluding the end point."

try out these
3 .. 7
3 ..^ 7
3 ^.. 7
3 ^..^ 7

and also see
https://docs.raku.org/routine/...html
https://docs.raku.org/routine/$CIRCUMFLEX_ACCENT...html
https://docs.raku.org/routine/$CIRCUMFLEX_ACCENT..$CIRCUMFLEX_ACCENT





-y


On Wed, Dec 30, 2020 at 9:42 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 12/30/20 6:04 PM, Curt Tilmes wrote:
> > On Wed, Dec 30, 2020 at 8:40 PM ToddAndMargo via perl6-users
> > <perl6-us...@perl.org> wrote:
> >> In the following for loop:
> >>
> >>       for ^$nCount -> $i {
> >>
> >> What is the ^ doing?
> >
> > https://docs.raku.org/type/Range   About the third paragraph from the
> top:
> >
> > The caret is also a prefix operator for constructing numeric ranges
> > starting from zero:
> >      my $x = 10;
> >      say ^$x;     # same as 0 ..^ $x.Numeric
> >
>
> Thank you!
>
> In a for look, it looks like 0 through 9.  Is that
> the for loops doing?
>
>

Reply via email to