in reply to printf & sprintf: variable number formats

Just a small additional remark. It would appear that "%d" is preferable to "%i", based on this extract from perldoc sprintf:

Finally, for backward (and we do mean "backward") compatibility, Perl permits these unnecessary but widely-supported conversions:
%ia synonym for %d
(etc)

So prefer sprintf "%0${int}d" or whatever...

dave