Thanks all. I should have realised this myself. In fact, further reading TFM shows that the problem of rounding with (s)printf is specifically addressed in perlfaq4: Does Perl have a round() function?
dave
In reply to Re: (s)printf and rounding woes
by Not_a_Number
in thread (s)printf and rounding woes
by Not_a_Number
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |