Works fine for me:
$ perl -e ' > $nfc_amt = 114; > print "NFC_AMT before adding zeroes: $nfc_amt\n"; > $nfc_amt = sprintf("%07d", $nfc_amt); > print "NFC_AMT after adding zeroes: $nfc_amt\n"; > ' NFC_AMT before adding zeroes: 114 NFC_AMT after adding zeroes: 0000114
How are you setting $nfc_amt in the first place?
In reply to Re: sprintf() returning incorrect value
by hippo
in thread sprintf() returning incorrect value
by ppeel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |