Re: return code?

2018-07-29 Thread ToddAndMargo
On 07/29/2018 03:03 AM, Patrick Spek via perl6-users wrote: You can use the head[2] sub to write it as for @ReturnAry.head(*.elems - 3) -> $line Also, on the $ReturnStr += $Line If you're trying to concatenate a string, you should use the ~ instead of the +, so it'd become $Re

Re: return code?

2018-07-29 Thread ToddAndMargo
*From:* Brandon Allbery *Sent:* Saturday, July 28, 2018 16:22 *To:* ToddAndMargo *Cc:* perl6-users *Subject:* Re: return code? Yes, that's what I was addressing: you can tell run() to do that, keeping stderr separate with :err(). qxx does that internally. On Sat, Jul 28, 2018 at 4:12 PM Tod

Re: What does ^parents really tell you?

2018-07-29 Thread Laurent Rosenfeld via perl6-users
Hi, Try this: my $stringy = "abc"; say $stringy.^parents(:all); This should display: ((Cool) (Any) (Mu)) Cheers, Laurent. 2018-07-29 19:27 GMT+02:00 Joseph Brenner : > If you look at the type diagram: > > https://docs.perl6.org/type/Str#___top > > You can see that: >Str is Cool is An

Re: What does ^parents really tell you?

2018-07-29 Thread Brandon Allbery
I think you want ^mro? On Sun, Jul 29, 2018 at 1:28 PM Joseph Brenner wrote: > If you look at the type diagram: > > https://docs.perl6.org/type/Str#___top > > You can see that: >Str is Cool is Any is Mu > > But if you use the ^parents method on a string, you don't get > "Cool", instead you

What does ^parents really tell you?

2018-07-29 Thread Joseph Brenner
If you look at the type diagram: https://docs.perl6.org/type/Str#___top You can see that: Str is Cool is Any is Mu But if you use the ^parents method on a string, you don't get "Cool", instead you get "()": my $stringy = "abc"; say $stringy.^name; # Str say $stringy.^parents;

Re: return code?

2018-07-29 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I'd gladly help you get your first module published. First off, you'll need to have a META6.json describing which files your module will provide, and which dependencies it needs. You always will need this json file, even if you have no dependencies.

Re: return code?

2018-07-29 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I get the idea that you're trying to get a list of lines with the @ReturnAry = split "\n", qqx ( curl $TimeOutStr -L $Url -o $FileName; echo \$\? ); You can use the lines[1] sub for exactly this. Similarly for this line for @ReturnAry[

Re: return code?

2018-07-29 Thread ToddAndMargo
On 07/28/2018 11:46 PM, ToddAndMargo wrote: On 07/28/2018 01:37 AM, ToddAndMargo wrote: Hi All, How do I get the bash return code ("$?") from the following? $ReturnStr = qqx ( curl $TimeOutStr -L $Url -o $FileName ).lines; Many thanks, -T Followup: This is what I came up with:    if $P