From the course: Perl 5 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The string concatenation operator - Perl Tutorial
From the course: Perl 5 Essential Training
The string concatenation operator
- [Voiceover] The string concatenation operator is used for combining strings. Here's a working copy of strcat.pl from Chapter Eight of the exercise files. String concatenation is very simple, two strings combined, one after the other with no separation. So when I go ahead and I run this, you'll see it says, "Hello, world," and you'll notice that there is no separation between the two words. That's because the strings are simply concatenated. One string is put right at the end of another string, and the two strings are combined without anything in between them. If you want some separation in between them, you can concatenate another string and put that separation in that other string, like that, and I can run this and now I have hello comma space world. Course, string concatenation works with more than two strings, say str three equals more and I can do the same thing here, I can put in another separator and dollar str three, and I can run that and it now says "more" at the end there.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
About Perl's operators2m 35s
-
(Locked)
Basic arithmetic operators5m 30s
-
(Locked)
Compound assignment operators2m 5s
-
(Locked)
Relational operators3m 27s
-
(Locked)
Logical operators6m 1s
-
(Locked)
File test operators3m 42s
-
(Locked)
The range operator2m 54s
-
(Locked)
The string concatenation operator1m 31s
-
(Locked)
Quote operators4m
-
(Locked)
-
-
-
-
-
-
-
-