nande9 has asked for the wisdom of the Perl Monks concerning the following question:
I have a somewhat general question about the Perl concatenate operator and the append operator.
First, here is the example straight from Learning Perl (p.29)
# append a space to $str $str = $str . " ";
# same thing with assignment operator $str .= " ";
My question: Are either of these method more "correct" or preferred for speed or syntactical reasons?
Any information is greatly appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Concatenate vs Append Operator
by Your Mother (Archbishop) on Aug 19, 2014 at 17:21 UTC | |
|
Re: Perl Concatenate vs Append Operator
by Jim (Curate) on Aug 19, 2014 at 16:59 UTC | |
|
Re: Perl Concatenate vs Append Operator
by McA (Priest) on Aug 19, 2014 at 17:31 UTC | |
by Anonymous Monk on Aug 19, 2014 at 18:08 UTC | |
by McA (Priest) on Aug 19, 2014 at 18:47 UTC | |
by Laurent_R (Canon) on Aug 19, 2014 at 21:32 UTC | |
|
Re: Perl Concatenate vs Append Operator
by Anonymous Monk on Aug 19, 2014 at 18:55 UTC | |
by Anonymous Monk on Aug 19, 2014 at 21:08 UTC | |
by locked_user sundialsvc4 (Abbot) on Aug 19, 2014 at 21:15 UTC | |
|
Re: Perl Concatenate vs Append Operator
by Anonymous Monk on Aug 19, 2014 at 17:10 UTC |