in reply to Re^2: Numeric overloading with 64-bit Perl
in thread Numeric overloading with 64-bit Perl

The manual, clearly describes that "use integer;" controls the actual computation, rather than coercing anything afterwards. Specifically, when use integer is in effect, floating point numbers will be rounded, but integers will not be coerced into floating point - they will stay integer before during and after any computation in the relevant scope.

I suggested placing it at the top of the example program because the example program had only one purpose - to show where float conversion took place for 16 digits. This should not be construed as a recommendation to always place it at the top of every program.

Re your subsequent objection to the block scope nature of use integer, I can't conceive of any actual case where the use of

{ use integer;" # statements where the pragma is required # ... "}"
wherever the pragma is actually required, can fail to control the scope - curly brackets can be applied anywhere you like!

-M

Free your mind