"be consistent" | |
PerlMonks |
Re: Re: Can I pad a number with leading spaces rather than leading 0'sby greywolf (Priest) |
on Aug 21, 2001 at 00:16 UTC ( [id://106350]=note: print w/replies, xml ) | Need Help?? |
Oops, I missed the formatting of my results list (multiple spaces are ignored yadda yadda yadda) but you nailed it. I am looking for the all $'s to line up on the left and all the decimal places to line up on the right.
sprintf("\$%08.2f", $price) formats the way I want to but I don't want to see the 0's. sprintf("\$%8.2f", $price) seems to forget about the padding up front. mr greywolf
In Section
Seekers of Perl Wisdom
|
|