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

Re: shorter way to set states in -n?

Thread Previous
From:
Marc Chantreux
Date:
July 3, 2022 00:25
Subject:
Re: shorter way to set states in -n?
Message ID:
YsDh0aFxnKyRBMZS@prometheus.u-strasbg.fr
Ralph,

On Sat, Jul 02, 2022 at 08:27:19PM +0100, Ralph Mellor wrote:
> Does this do what you want:
> 	BEGIN my (@o, @f) = 0 xx 3;
> 	@o.push: "ok";
> 	say @o;
> 

seq 2|raku -ne '
	BEGIN my (@o, @f) = 0 xx 3;
	@o.push: "ok";
	say @o;
'

works fine! thank you very much.
-- 
Marc Chantreux
Direction du numérique de l'Université de Strasbourg
Pôle de Calcul et Services Avancés à la Recherche (CESAR)
http://annuaire.unistra.fr/p/20200

Thread Previous


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