Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

RE: RE: regexp for adding commas to a number

by AltBlue (Chaplain)
on Aug 17, 2000 at 23:45 UTC ( [id://28363]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $number =~ s/(\d+)(\.\d+)?/bea_int($1).$2/eg;      
    sub bea_int {
    ...
       $kk =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g;
       return $kk;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-18 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found