Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: (Golf) Formatting Integer To Money

by Aristotle (Chancellor)
on Aug 29, 2002 at 17:53 UTC ( [id://193840]=note: print w/replies, xml ) Need Help??


in reply to (Golf) Formatting NumberTo Money

53
# 1 2 3 4 5 #2345678901234567890123456789012345678901234567890123 $_=sprintf"%.2f",pop;{s/(^\d+)(\d{3})/$1,$2/&&redo}$_

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-20 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found