CHAPTER 4Operators

Operators allow us to both compute and compare values. Arithmetic operators like plus and minus, which indicate addition and subtraction, are typical computational operators, whereas "equal to" and "greater than" are typical comparative operators. Operators combine with values to make expressions, each of which has a value that is the result of its computation. These in turn may be combined into larger expressions (also called compound expressions) using additional operators. Values may be literal, held in variables, or returned as the result of subroutine calls or other expressions.

Operators require one or two (and in one case, three) input values to work on, producing a single output value as their result. With the exception ...

Get Pro Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.