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

something between run and qx() ?

Thread Next
Marc Chantreux
August 4, 2022 08:36
something between run and qx() ?
Message ID:
hello people,

I found myself choosing between

raku -e '
	(run :out, <
		dpkg-query -f ${db-fsys:Files} -W gnuplot*
	> ).out>>.lines>>.trim>>.grep(*.IO.f)>>.say'


raku -e '
		dpkg-query -f \${db-fsys:Files} -W gnuplot\*

I really love the qx syntax but

* it runs an extra useless sh processus
* I need to quote the shell symbols

I read the Proc documentation and tried to see if there was another
command or an adverb to the qx construction (something like :r for run).

What I really would like to write is:

raku -e ' qx:r< dpkg-query -f ${db-fsys:Files} -W gnuplot* >.lines>>.grep(*.IO.f)>>.say '

Any suggestion is welcome.


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

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