Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: (Golf) Formatting Integer To Money

by xylus (Pilgrim)
on Aug 29, 2002 at 17:36 UTC ( #193834=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub a{$_=pop;{s/(\d)(\d{3})(?!\d)/$1,$2/&&redo}$_.'.00'}
    
  2. or download this
    perl -e '$_=$0;split??;chop$_;$;=pop@_;$;++for(0..9060420);$_.=reverse
    +$;;print'
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2023-12-10 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (39 votes). Check out past polls.

    Notices?