in reply to How to zero-pad hex values in sprintf()?
-
am I crazy or do printf() and sprintf() have no way to return, say, 0F instead of just F?
I'm not a psychiatrist and never played one on TV so I can't judge if you're crazy or not. But check out this sniglet of code.
$ perl -e 'printf "%0.4x\n",128;' 0080
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
In Section
Seekers of Perl Wisdom