in reply to Various ways to concatenating an array of strings

I have wished before that the language had a built-in to handle the special case of join('', ...), although that has mostly been when I'm trying to write obfuscated Perl, so it is not a significant lack. You could do it with interpolation:
{ local $"; $scalar = "@array"; }
but my guess is that join is the best way to go about it. TMTOWTDI but as duff pointed out, using another method will be much less clear when reading the code.

Replies are listed 'Best First'.
Re^2: Various ways to concatenating an array of strings
by hawtin (Prior) on Mar 31, 2006 at 12:10 UTC

    Thank you for actually answering my question, rather than telling me I don't know what I am doing. I had not considered interpolation it sounds like a good alternative.

    As I mentioned in the original post join caused some serious issues in certain pathalogical cases, the fact that it is the "obvious" solution doesn't help if it kills the machine for some (rare) cases.

    Having a solution that works reliably is of slightly higher priority than the extra few lines of comments that an obscure construct will require.