O'Reilly Answers is a community site for sharing knowledge, asking questions, and providing answers that brings together our customers, authors, editors, conference speakers, and Foo (Friends of O'Reilly). More »
If you want to round a floating-point value to a certain number of decimal places, use the Perl function sprintf, or printf if you're just trying to produce output:
# round off to ...