![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re^4: Concatenation with empty string -- good enough to force physical copy?by ikegami (Patriarch) |
on Dec 03, 2020 at 23:12 UTC ( #11124610=note: print w/replies, xml ) | Need Help?? |
You seem to have answered your own question. All kinds of weird things can happen, including modifying scalars you didn't intend to modify. You could even change what string literals return! They don't force a copy; they force the scalar to contain a modifiable string. If that's already the case, they do nothing more than the non-force equivalents.
In Section
Seekers of Perl Wisdom
|
|