perlquestion
CodeJunkie
<p>Hi Monks,<br/>
Can anyone help me make my money look nice!?</p>
<p>I have a value of, say £195000. This is ugly looking and I want to put commas in it to make it more readable. I.e. £195,000.</p>
<p>Now I can do this fine if I know how long the number is, i.e. do some kind of substitution based on \d{3} but what if I don't know how long the number is?</p>
<p>I guess I would have to count the number of digits to work out the number of commas, then count in 3's from the right, adding commas where appropriate.</p>
<p>Anyway, I thought maybe someone could just tell me there is a cool little module that does this for me, or perhaps give me a clue what the substitution would look like?</p>
<p>Thanks for any help,<br/>
Cheers,<br/>
Tom</p>