Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: Separating big numbers with commas

by QM (Parson)
on Feb 23, 2015 at 12:04 UTC ( #1117534=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    > BLAH=$(perl -e 'for (@ARGV){s/(\d)(?=(\d{3})+(\D|$))/$1\,/g;print qq
    +/$_\n/}' 12345678 876543210)
    12,345,678
    ...
    
    > echo $BLAH
    12,345,678 876,543,210
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2021-07-26 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?