Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Re: Separating big numbers with commas

by blakem (Monsignor)
on Sep 05, 2001 at 01:26 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://110162]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-25 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found