Why do they use the “.” operator in Perl if it does not alter the string?
I do not use Perl, but some reading (like here and here) seem to say that the .
operator is a concatenation operator (much like +
in Python, or .
(the same symbol) in PHP). Concatenation joins two strings together, but, as string are immutable, a new string is created that is a combination of the strings you concatenated. I hope this helps!
1 Like