In this chapter, we looked at Perl’s operators. First we examined the difference between an operator and a built-in function, and found that functions are really just a special class of list operators. We then took an in-depth look into the different types of operators, categorized into numerous loosely associated classes. We then covered precedence and associativity, and looked at the effect of parentheses on precedence. We then took a brief look at controlling the availability of operators and function with the Opcode module, and defining new operators behaviors using objects with the overload module. Finally, we considered the distinction between operators and functions in Perl, finding that in many cases the difference is only one of our perspective.
KeywordsLogical Operator Regular Expression Range Operator Unary Operator Arrow Operator
Unable to display preview. Download preview PDF.