Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- sprintf formating
November 20, 2005, 4:28 pm
rate this thread
Re: sprintf formating
sprintf() can help with the rounding part.
tr/// can help with transliterating characters.
The Perl FAQ shows how to insert a comma every 3 digits:
perldoc -q numbers
How can I output my numbers with commas added?
So you have the rounding handled. Good.
Use the FAQ solution to insert commas, then change the characters
that you want changed with:
tr/,./ ,/; # comma->space and dot->comma
Tad McClellan SGML consulting
firstname.lastname@example.org Perl programming
Fort Worth, Texas
- Lars Kellogg-Stedman
November 20, 2005, 5:33 pm
- » FAQ 8.47 How do I keep my own module/library directory?
- — Previous thread in » PERL Discussions