Can't reproduce:
my $nfc_amt = 115; print "NFC_AMT before adding zeroes: $nfc_amt\n"; $nfc_amt = sprintf("%07d", $nfc_amt); print "NFC_AMT after adding zeroes: $nfc_amt\n"; __END__ NFC_AMT before adding zeroes: 115 NFC_AMT after adding zeroes: 0000115
Likely it doesn't contain what you think it contains. Could you add this to your code and show us the output: use Devel::Peek; Dump($nfc_amt);
In reply to Re: sprintf() returning incorrect value
by Anonymous Monk
in thread sprintf() returning incorrect value
by ppeel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |