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

Re: something between run and qx() ?

Thread Previous
Marc Chantreux
August 4, 2022 15:37
Re: something between run and qx() ?
Message ID:
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!

Marc Chantreux
Pôle de Calcul et Services Avancés à la Recherche (CESAR)

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About