Using Perl to Do Calculations

Mark D. LeBlanc, Betsey Dexter Dyer · Oxford University Press eBooks · 2007

Abstract This chapter elucidates some of the mysteries of calculating with Perl. Arithmetic in Perl is fairly intuitive in its use of symbols. There are all sorts of reasons for doing a little arithmetic on the fly in the midst of a Perl program. In addition to coverage of the arithmetic operators, operator precedence, mathematical library functions, and formatted output, the correctness of equations is stressed throughout the chapter, the motto being ‘...if you are almost correct you are a liability’. Side boxes include: napkin math, Jorge Luis Borges' Library of Babel, a bookshelf of DNA, and creating a programming community.

Read the paper · More papers on PaperTik