in reply to Padding out strings.

just use sprintf. it will generate a string according to your format specification. check perldoc -f sprintf for the info :)