in reply to Re: printf numification
in thread printf numification

My take on the docs is that '%4.4d' is legal. Maybe not the most straight forward way, but legal. I think I regularly abuse it this way, a mental hangover from the 's' format I think.

Anyway, no matter, '%04d' doesn't numify here either.

Yuck%4.4d

Update: From perldoc -f sprintf:

Perl permits the following universally-known flags between the "%" and the conversion letter: space prefix positive number with a space + prefix positive number with a plus sign - left-justify within the field 0 use zeros, not spaces, to right-justify # prefix non-zero octal with "0", non-zero hex with "0x" number minimum field width .number "precision": digits after decimal point for floating-point, max length for string, minimum length for integer