perlquestion
dwatson06
I am trying to write a set of numbers to a file so that another programmer may reference them. This number needs to be zero filled with 9 digits. I can use the following to print out on the command line... <br>
my $getNumber = 213;<br>
printf "%09d$getNumber";<br>
And it prints fine but when I write to file it writes%09d213.<br> Is there a simple sub included to pad numbers (or zero fill) to a given length? <br>
Thank you, <br>Daniel