develooper Front page | perl.perl6.users | Postings from July 2022

Re: shorter way to set states in -n?

Thread Previous | Thread Next
From:
Ralph Mellor
Date:
July 2, 2022 19:28
Subject:
Re: shorter way to set states in -n?
Message ID:
CAPLR5Se5UxsX8wb5JbdNB2GKm3M+CRBGp7u1F5jJE8RN36Ohpw@mail.gmail.com
On Sat, Jul 2, 2022 at 5:26 PM Marc Chantreux <mc@unistra.fr> wrote:
>
> AFAIK about raku -n, I need 2 lines to setup a state with a default value

Does this do what you want:

                BEGIN my (@o, @f) = 0 xx 3;
                @o.push: "ok";
                say @o;

?

love, raiph

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About