Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Re: Separating big numbers with commas

by blakem (Monsignor)
on Sep 05, 2001 at 01:26 UTC ( #110162=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -wT
    use strict;
    ...
    
    $number =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g;
    print "N=$number\n";
    
  2. or download this
    N=1234567890.01
    N=1,234,567,890.01
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2020-05-29 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (169 votes). Check out past polls.

    Notices?