$int = 5; sprintf "%0${int}i", $myInt;
You were missing the curly-braces around the variable name.
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Re: printf & sprintf: variable number formats
by dragonchild
in thread printf & sprintf: variable number formats
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |