Frank Schönmann: Zeichenkettenverknüpfung in einer Variablen

Beitrag lesen

hi!

Wie ist das nun mit dem Verhältnis von Punkt und Komma in so einer
Konstruktion?

Wenn ich dich richtig verstanden habe, ist dir der Unterschied
zwischen Komma- und Punkt-Operator in Perl nicht ganz klar. Und was
macht man in so einem Fall? Richtig, man schaut in die perldoc:

=== cut ===
       Additive Operators

Binary "+" returns the sum of two numbers.

Binary "-" returns the difference of two numbers.

Binary "." concatenates two strings.

[...]

Comma Operator

Binary "," is the comma operator.  In scalar context it
       evaluates its left argument, throws that value away, then
       evaluates its right argument and returns that value.  This
       is just like C's comma operator.

In list context, it's just the list argument separator,
       and inserts both its arguments into the list.

The => digraph is mostly just a synonym for the comma
       operator.  It's useful for documenting arguments that come
       in pairs.  As of release 5.001, it also forces any word to
       the left of it to be interpreted as a string.
=== cut ===

bye, Frank!

--
Never argue with an idiot. He will lower you to his level and then
beat you with experience.