prints 4.63, which is not a trimming of the string to two decimal places.
That's not a bug; it's a feature :-) . Seriously, that's the documented behavior for sprintf, and precisely why it is the standard way to do rounding in Perl.
the lowliest monk
In reply to Re^5: Coping with decimals
by tlm
in thread Coping with decimals
by Ruanae
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |