O'Reilly logo

Perl by Example, Fourth Edition by Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Where’s the Operator?

Where’s the Operator?

About Perl Operators

In the real world, there are operators who operate switchboards, computers, bulldozers, tanks, etc. In Perl, operators operate on numbers and strings or a combination of them. Operators are symbols, such as +, -, =, >, <, that produce a result based on some rules. An operator manipulates data objects called operands; e.g., 5 and 4 are operands in the expression 5 + 4. Operators and operands are found in expressions. An expression combines a group of values to make a new value, n = 5 + 4. And when you terminate an expression with a semicolon, you have a complete statement; e.g., n = 5 + 4.

Figure 6.1. Evaluating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required