develooper Front page | perl.perl6.users | Postings from September 2017

Need append help

Thread Next
From:
ToddAndMargo
Date:
September 29, 2017 17:49
Subject:
Need append help
Message ID:
e67a8ba5-69e2-ca22-e857-cced5c6863bf@zoho.com
Hi All,

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?

Many thanks,
-T


https://docs.perl6.org/routine/append
$ perl6 -e 'my $x="abc"; $x.append("def"); say $x;'

Cannot resolve caller append(Str: Str); none of these signatures match:
     (Any:U \SELF: |values is raw)
   in block <unit> at -e line 1

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About