go ahead... be a heretic | |
PerlMonks |
Re: Concatenation with empty string -- good enough to force physical copy?by dave_the_m (Monsignor) |
on Dec 02, 2020 at 11:11 UTC ( [id://11124513]=note: print w/replies, xml ) | Need Help?? |
Basically you're trying to defeat perl's copy-on-write optimisation. Concatting an empty string will currently do this, but there are no future guarantees. If you want your code to be robust you really need to handle this at the C level.
Dave.
In Section
Seekers of Perl Wisdom
|
|