in reply to Formating a printf statement using a variable

Yes, it's quite possible:
$a="%-2s"; printf $a,$b; $c="2s"; printf "%-$c",$b;

mr.nick ...