The printf function is available in Perl, and it works
just like the C and C++ printf routines.
printf is pretty simple, but has about a gazillion
options. See any good C reference, or simply man printf on
any self respecting unix system for full options and usage
instructions.