in reply to Re^2: Left padding a number with zeros: PerlFaq method didn't work for me.
in thread Left padding a number with zeros: PerlFaq method didn't work for me.
The FAQ is correct, you are just interpreting it wrong. The 'integer in place of $pad_len' would not mean to replace the ${pad_len} part with ${4}. Doing so mistakenly causes the sprintf to use $4, which is undefined. The correct way to replace it would be;
$Wmmyy = sprintf("%04d", $FORM{'SRmmyy'});<br>
Scott
|
|---|