On 09/29/2017 10:54 AM, Brandon Allbery wrote:
On Fri, Sep 29, 2017 at 1:49 PM, ToddAndMargo <toddandma...@zoho.com
<mailto:toddandma...@zoho.com>> 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 string is a single thing; it doesn't make sense to list-append to it.
$x ~= "def";
$ 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 prepend?