in reply to Possible to use variable in printf statement?
See the printfdocs for the use '*' in a format specifier:
[0] Perl> printf "%*s\n", $_, 'hello' for 10 .. 20;; hello hello hello hello hello hello hello hello hello hello hello [download]