Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: (Golf) Formatting NumberTo Money

by Django (Pilgrim)
on Aug 29, 2002 at 19:06 UTC ( [id://193863]=note: print w/replies, xml ) Need Help??


in reply to (Golf) Formatting NumberTo Money

54 without declaration, else 61
sub a{$_=sprintf"%.2f",pop;{s/(\d+)(\d{3}.*)/$1,$2/?redo:$_}}

~Django

"Why don't we ever challenge the spherical earth theory?"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://193863]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-20 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found