it just isn't as pretty. But it also works with constants$int = 5; printf "%0" . $int . "i", $myInt;
use constant COLWIDTH => 5; $int = 5; printf "%0" . COLWIDTH . "i", $myInt;
--
flounder
In reply to Re: printf & sprintf: variable number formats
by flounder99
in thread printf & sprintf: variable number formats
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |