No such thing as a small change | |
PerlMonks |
Re: Unwanted Octal to Decimal Conversionby iburrell (Chaplain) |
on Feb 18, 2004 at 21:02 UTC ( [id://330061]=note: print w/replies, xml ) | Need Help?? |
First, you can pad the sprintf output by adding "04" to the format string:
Second, I would suggest storing the permissions in the database as decimal integers instead of octal integers or strings. You would display them in octal. This will save all kinds of headaches since the database won't know the numbers are in octal and either won't operate on strings or won't operate wrong thinking they are decimal.
In Section
Seekers of Perl Wisdom
|
|