Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Perl Concatenate vs Append Operator

by Your Mother (Archbishop)
on Aug 19, 2014 at 17:21 UTC ( [id://1098008]=note: print w/replies, xml ) Need Help??


in reply to Perl Concatenate vs Append Operator

FWIW, there are better ways to do what concatenation does… 90% of the time? Not that it’s wrong but that there are cleaner ways that are more flexible and easier to build on or manipulate or test or pass around; print join " ", @strings; for example v $string .= $_ . " " for @stuff.

There are no good or bad operators but, for me, string concatenation, while it is naturally the way a lot of think/code at first, is code smell most of the time.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1098008]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found