[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] How do I turn 17.1 into "017.100" ?



Given any number I want a string where (1) the whole string is 7
characters long, (2) there are three digits after the decimal point, and
(3) the number is zero padded in front.  

e.g.: 17.1 becomes "017.100".  

Is there a printf FORMAT for this? Or is this a 4 liner?

Thanks,

j