in reply to Perl Problems with Digit Precision Changing on the Printf Statement
You need to define "doesn't work" and state what results you expected.
freebie:~ 604> perl -le '$a="abc"x3;for $w (10, 15, 20) { printf "|%-$ +{w}s|\n", $a }' |abcabcabc | |abcabcabc | |abcabcabc |
|
|---|