the value of the number can change due to rounding off. If all you really want to do is right-justify, the %s template BMDan suggests might be more appropriate.
Thats the best suggestion I"ve ever seen you post summer_cherry. It does assume that the first line of the file should be used to set the width of all the rest of the lines, but sometimes we do have to make assumptions when posting suggestions.
The widths probably have to be adjusted but you get the idea, I hope.
With use warnings you would get an error message (albeit a somewhat misleading one) for using printf with too few parameters. For backwards-compatibility reasons, Perl is woefully silent by default. You want to get into the habit of adding use strict; use warnings; to all of your scripts.