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.
About Perl's operators - Perl Tutorial
From the course: Perl 5 Essential Training
About Perl's operators
- [Voiceover] Perl provides a very rich set of operators for many different purposes. Before we get in to the details, let's consider what an operator is and how it works. An operator takes operands and returns a value. For example, here's a very simple line of code. It contains two operators. The addition operator takes two operands and returns the sum of the operands. The assignment operator takes two operands and copies the value of the right-hand side to the variable on the left-hand side. In Perl, most operators determine the operation that is performed without concern for the type of the operands. For example, in this expression the addition operator adds two numbers. Perl will first try to convert the scaler variables to numeric values and if it is unable to do this, it will throw an error. This means that Perl must have different versions of some operators for numeric or string context. In this case the double equal operator compares two numeric values for equality while the…
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)
-
-
-
-
-
-
-
-