Summary
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2005 Peter Wainwright
About this chapter
Cite this chapter
(2005). Operators. In: Pro Perl. Apress. https://doi.org/10.1007/978-1-4302-0014-7_4
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0014-7_4
Publisher Name: Apress
Print ISBN: 978-1-59059-438-4
Online ISBN: 978-1-4302-0014-7
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books