in reply to Integer vs Float during addition

Expect instead that Perl will behave according to Perl documentation not C documentation. The requirement you describe (conformance to a fixed number of decimal places, rather than significant digits) conforms to the notion of fixed point arithmetic - floating point means that only significant digits are shown stored, not any zeroes after the point. (COBOL, not C, is the legacy language that most readily springs to mind for supporting fixed point arithmetic.)

Perl is quite capable of handling such storage formats however. If you have such specific storage requirements for a Perl program, it is usually best to take charge of how data is stored and converted using the pack and unpack functions. But if it is just a matter of formatting, the printf and sprintf functions can do that for you.

-M

Free your mind