On 2012-08-31 15:17, Torsten wrote:
I found a strange behaviour for printf: If you do for exampleprintf "%d",29/100*100 you get 28. But with printf "%d",29*100/100 it's 29. Seems to be related to rounding. The perl version is 5.10.1 on debian.
There is nothing strange about it. I think you are looking for the "%.0f" format. See also 'perldoc -q decimal'. -- Ruud -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
