Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How do I print a large integer with thousands separators?

by Anonymous Monk
on Aug 15, 2003 at 12:32 UTC ( [id://284131]=note: print w/replies, xml ) Need Help??


in reply to How do I print a large integer with thousands separators?

my $number = '$12345678.90'; # dollars $_ = reverse $number; s/(\d{3})(?=\d)(?!\d*\.)/$1,/g; $number = reverse $_;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found