AI Features

Operator Characteristics

Learn about operator characteristics in Perl.

Some people call Perl an operator-oriented language. A Perl operator is a series of one or more symbols used as part of the syntax of a language. Each operator operates on zero or more operands. Think of an operator as a special function the parser understands and its operands as arguments.

We’ve seen how Perl manages context through its operators. To understand Perl fully, we must understand how operators interact with their operands.

Operator characteristics

Every operator possesses several important characteristics that govern its behavior: the number of operands on which it operates, its relationship to other operators, the contexts it enforces, and the syntax it provides.

perldoc perlop and perldoc perlsyn provide voluminous information about Perl’s operators, but the docs assume we’re already familiar with a few essential computer science concepts. Fortunately, we’ll recognize these ideas from written language ...