Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Concatenate or Join?

by LanX (Chancellor)
on Nov 12, 2012 at 20:33 UTC ( #1003503=note: print w/ replies, xml ) Need Help??


in reply to Concatenate or Join?

Simple, concat doesn't create a new copy, it's just enlarging the old one as long as the allocated buffer allows to.

I think you are confusing Perl with languages like JS, Java or Python where (the memory representation) of strings is immutable, i.e. can only be created, read or deleted but never updated.

see also http://stackoverflow.com/questions/51185/are-javascript-strings-immutable-do-i-need-a-string-builder-in-javascript

Cheers Rolf


Comment on Re: Concatenate or Join?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2016-02-13 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (420 votes), past polls