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

Re: something between run and qx() ?

Thread Previous
From:
Marc Chantreux
Date:
August 4, 2022 15:37
Subject:
Re: something between run and qx() ?
Message ID:
YuvnnHw1wvofL6g4@prometheus.u-strasbg.fr
Hi Liz!

> sub prefix:<`>(*@a) { (run @a, :out).out.lines }

Thanks for this example, I now can write things like

	.say for grep / '.txt' $ /, `<ls>
	for `<ls> { .say if / '.txt' $ / }

which made me remember I wrote something similar (but not working) for
the FOSDEM talk:

sub prefix:<`>(|c) is tighter(&infix:<.>) { (run :out, c).out.lines }

the `is tighter` thing was because I hoped I could write something like

`<ls>.grep( / '.txt' $ / ).say

Is is something to do to fix it ?

Thanks everything you do on Raku!

regards
-- 
Marc Chantreux
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