Re: $? and $! equivalents

[email protected] (Brandon Allbery) Fri, 14 Sep 2018 18:15:21 -0400
Newsgroups perl.perl6.language
Message-ID <CAKFCL4Uqc1g5ViqgHemoe4MZ8YTamsLu=YyQHV22igE-V0iOeQ@mail.gmail.com>
--0000000000006b79e70575dc2938
Content-Type: text/plain; charset="UTF-8"

Magic variables make multiple threads impossible, which is why perl 5 is
stuck with ithreads: what happens if two threads each "run" something at
around the same time?

In Perl 6, you have a Proc object for each subprocess, and can query it for
its status and/or result code; for things like sub run, the Proc should be
the return value.

On Fri, Sep 14, 2018 at 6:08 PM Parrot Raiser <[email protected]> wrote:

> This is probably going to be a forehead-slapper, but I can't find a
> reference in either perlintro.com or http://docs.perl6.org/
> (5to6-perlfunc or top-down)  for the equivalents of $? and $! in
> P6.What are they?
>
> I want to be able to "run" or "shell" programs, then examine return
> codes and errors. (The immediate case is to see if a program name is
> already in use by running  "which $progname". )
>


-- 
brandon s allbery kf8nh
[email protected]

--0000000000006b79e70575dc2938
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Magic variables make multiple threads impossible, which is=
 why perl 5 is stuck with ithreads: what happens if two threads each &quot;=
run&quot; something at around the same time?<div><br></div><div>In Perl 6, =
you have a Proc object for each subprocess, and can query it for its status=
 and/or result code; for things like sub run, the Proc should be the return=
 value.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Fri, =
Sep 14, 2018 at 6:08 PM Parrot Raiser &lt;<a href=3D"mailto:1parrota@gmail.=
com">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex">This is probably going to be a forehead-slapper, but I can&#39;t find a=
<br>
reference in either <a href=3D"http://perlintro.com" rel=3D"noreferrer" tar=
get=3D"_blank">perlintro.com</a> or <a href=3D"http://docs.perl6.org/" rel=
=3D"noreferrer" target=3D"_blank">http://docs.perl6.org/</a><br>
(5to6-perlfunc or top-down)=C2=A0 for the equivalents of $? and $! in<br>
P6.What are they?<br>
<br>
I want to be able to &quot;run&quot; or &quot;shell&quot; programs, then ex=
amine return<br>
codes and errors. (The immediate case is to see if a program name is<br>
already in use by running=C2=A0 &quot;which $progname&quot;. )<br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"l=
tr"><div><div dir=3D"ltr"><div>brandon s allbery kf8nh</div><div><a href=3D=
"mailto:[email protected]" target=3D"_blank">[email protected]</a></div=
></div></div></div></div>

--0000000000006b79e70575dc2938--