$a = 10 ; $b = 123456 ; printf "%${a}d", $b ; # instead of printf "%10d", $b ; [download]
In reply to printf with variable display width by jeanluca