note
davido
<p>There are seven ways I can immediately think of, and you've picked one of the clearest and easiest. Here is the list I can come up with:
</p>
<ul>
<li>The . (dot) operator: concatenation.</li>
<li>The .= operator: append.</li>
<li>[doc://substr]: Substring manipulation.</li>
<li>[doc://join]: Joining two or more strings.</li>
<li><c>s/(...)/$1$string/</c>: Substitution.</li>
<li>The qq/...../ or "...." operator: interpolation.</li>
<li>[doc://open]: <c>open my $fh, '>+', \$variable or die $!;</c>: Print to an in-memory filehandle.</li>
</ul>
<p>I'm sure I've missed a few, but these ways jump to mind immediately. The last method I listed; [doc://open], is pretty obfuscatory in nature. There aren't many situations I can think of where it would be a favorable approach, especially if simple concatenation is your goal. But it's there, so I mentioned it.</p>
<p>dot (.) and dot-equals (.=) are definitely the simplest and clearest approaches.</p>
<div class="pmsig"><div class="pmsig-281137">
<br /><p>Dave</p>
</div></div>
557427
557427