Section B.22. Operator Overloading


B.22. Operator Overloading

You can redefine operators like addition, concatenation, comparison, or even the implicit string-to-number conversion with the overload module. For example, this is how a module implementing complex numbers can let you multiply a complex number by 8 to get a complex number as a result.



Learning Perl
Learning Perl, 5th Edition
ISBN: 0596520107
EAN: 2147483647
Year: 2003
Pages: 232

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net