Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:41 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 3:27 PM, ToddAndMargo > wrote: I do not understand.  :'( There's not enough syntax to go around, so perl 6 has to use spaces sometimes to figure out what you want.

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:43 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 3:36 PM, ToddAndMargo > wrote: This is the correct one. The warning about "useless use" here is a bug in rakudo. It's meant to warn for things

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 3:36 PM, ToddAndMargo wrote: > This is the correct one. The warning about "useless use" here is a bug >> in rakudo. It's meant to warn for things like >> > Another bug. Lucky me, again. :'( > > Thank you! > Also, this is about the third time in

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 3:27 PM, ToddAndMargo wrote: > I do not understand. :'( > There's not enough syntax to go around, so perl 6 has to use spaces sometimes to figure out what you want. > $ perl6 -e 'my $x="abc"; $x[R~]= "yyz"; say $x;' > ===SORRY!=== Error while

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:30 PM, Timo Paulssen wrote: On 09/29/2017 09:27 PM, ToddAndMargo wrote: $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' Potential difficulties:     Useless use of [R~]= in sink context     at -e:1     --> my $x="abc"; $x ⏏[R~]= "yyz"; say $x; yyzabc This is the

Re: Need append help

2017-09-29 Thread Timo Paulssen
On 09/29/2017 09:27 PM, ToddAndMargo wrote: > $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' > Potential difficulties: >     Useless use of [R~]= in sink context >     at -e:1 >     --> my $x="abc"; $x ⏏[R~]= "yyz"; say $x; > yyzabc This is the correct one. The warning about "useless use"

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 12:12 PM, Andy Bach wrote: Hmm $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' yyzabc no space: $ perl6 -e 'my $x="abc"; $x[R~]= "yyz"; say $x;' ===SORRY!=== Error while compiling -e Missing required term after infix at -e:1 --> my $x="abc"; $x[R~⏏]= "yyz"; say $x;    

Re: Need append help

2017-09-29 Thread Andy Bach
Hmm $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"; say $x;' yyzabc no space: $ perl6 -e 'my $x="abc"; $x[R~]= "yyz"; say $x;' ===SORRY!=== Error while compiling -e Missing required term after infix at -e:1 --> my $x="abc"; $x[R~⏏]= "yyz"; say $x; expecting any of: prefix term $

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 11:32 AM, Sean McAfee wrote: On Fri, Sep 29, 2017 at 11:27 AM, Brandon Allbery > wrote: On Fri, Sep 29, 2017 at 2:04 PM, ToddAndMargo > wrote: Question:  Is

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 2:32 PM, Sean McAfee wrote: > On Fri, Sep 29, 2017 at 11:27 AM, Brandon Allbery > wrote: > >> On Fri, Sep 29, 2017 at 2:04 PM, ToddAndMargo >> wrote: >> >>> >>> Question: Is thee a pretty way like the above

Re: Need append help

2017-09-29 Thread Sean McAfee
On Fri, Sep 29, 2017 at 11:27 AM, Brandon Allbery wrote: > On Fri, Sep 29, 2017 at 2:04 PM, ToddAndMargo > wrote: > >> >> Question: Is thee a pretty way like the above to do a prepend? >> > > No, sorry. > Actually, there seems to be: > my $x =

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 2:04 PM, ToddAndMargo wrote: > $ perl6 -e 'my $x="abc"; $x ~= "def"; say $x;' > abcdef > > Perfect! Thank you! > > I am slowly getting away from my Modula 2 "Array of Characters" days. > > Question: Is thee a pretty way like the above to do a

Re: Need append help

2017-09-29 Thread ToddAndMargo
On 09/29/2017 10:54 AM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 1:49 PM, ToddAndMargo > wrote: I am trying to find a shorter way of doing      $x = $x ~ "def" But I can't seem to master "append" What am I doing

Re: Need append help

2017-09-29 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 1:49 PM, ToddAndMargo wrote: > I am trying to find a shorter way of doing > $x = $x ~ "def" > > But I can't seem to master "append" > > What am I doing wrong? > Again (as with last night in IRC) you are treating a string as a list. But a