Problems? Is your data what you think it is? | |
PerlMonks |
Can I pad a number with leading spaces rather than leading 0'sby greywolf (Priest) |
on Aug 20, 2001 at 23:02 UTC ( [id://106313]=perlquestion: print w/replies, xml ) | Need Help?? |
greywolf has asked for the wisdom of the Perl Monks concerning the following question:
I can use sprintf() to display numbers with leading 0's but I don't want the user to see them.
I want the users to see: $ 60.00 $160.00 $ 5.00 The $ is added in the output. I will need to sort my rows of data based on these prices. Is there some simple way to do this? Maybe using regex to insert spaces. mr greywolf
Back to
Seekers of Perl Wisdom
|
|