The SF Perl Raku Study Group, 08/07 at 1pm PDT

2022-08-04 Thread Joseph Brenner
Walt Whitman, "Democratic Vistas" (1871): "... ahead, though dimly yet, we see, in vistas, a copious, sane, gigantic offspring." The Raku Study Group August 7, 2022 1pm in California, 9pm in the UK Zoom meeting link: https://us02web.zoom.us/j/83144051426?pwd=UTVhclVPeVJlM0k0M3FNN1JqNXg0Zz0

Re: something between run and qx() ?

2022-08-04 Thread Marc Chantreux
Hi Liz! > sub prefix:<`>(*@a) { (run @a, :out).out.lines } Thanks for this example, I now can write things like .say for grep / '.txt' $ /, ` for ` { .say if / '.txt' $ / } which made me remember I wrote something similar (but not working) for the FOSDEM talk: sub prefix:<`>(|c

Re: something between run and qx() ?

2022-08-04 Thread Elizabeth Mattijsen
> On 4 Aug 2022, at 14:38, Marc Chantreux wrote: > It would be nice to define a backtrick operator (like in rc) so we > could write > > my @installed-files = > grep *.IO.f, > map *.trim, > `< dpkg-query -f ${db-fsys:Files} -W gnuplot* >; > > insead

Re: something between run and qx() ?

2022-08-04 Thread Marc Chantreux
hello Liz and thanks for helping, > I believe you could use App::Rak for that: > $ zef install App::Rak I'll test rak at some point but in this case, I can just write dpkg-query -f \${db-fsys:Files} -W gnuplot\* | raku -pe '.=trim; .say if .trim.IO.f' I asked the question a

Re: something between run and qx() ?

2022-08-04 Thread Marc Chantreux
Hi Brian and thanks for your reply. > There is the 'x' adverb for Q -- I think qx is equivalent to Q:x exactly. that's why Q:x doesn't help as it still run sh -c to execute the command. regards, -- Marc Chantreux Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.

Re: something between run and qx() ?

2022-08-04 Thread Brian Duggan
On Thursday, August 4, Marc Chantreux wrote: > 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). There is the 'x' adverb for Q -- I think qx is equivalent to Q:x https://docs.raku.org/syntax/Q Brian

Re: something between run and qx() ?

2022-08-04 Thread Elizabeth Mattijsen
> On 4 Aug 2022, at 10:35, Marc Chantreux wrote: > > 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' > > and > > raku -e ' > qx< >

something between run and qx() ?

2022-08-04 Thread Marc Chantreux
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' and raku -e ' qx< dpkg-query -f \${db-fsys:Files} -W gnuplot\* >.lines.tri