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

Re: Need append help

Thread Previous | Thread Next
Brandon Allbery
September 29, 2017 17:54
Re: Need append help
Message ID:
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 string is a single thing; it doesn't make sense to list-append to it.

    $x ~= "def";

brandon s allbery kf8nh                               sine nomine associates                        
unix, openafs, kerberos, infrastructure, xmonad

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About