Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by scottj (Monk)
on Jan 31, 2004 at 10:43 UTC ( #325534=note: print w/replies, xml ) Need Help??


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

Your test script was very educational for me. I'd never seen use of the Benchmark module before. It looks like you've certainly gotten a fast method for adding in the thousands separators.

For those who need something a bit easier to follow, I'd like to add the following to this topic:
#!/usr/bin/perl use Number::Format; my $num = 12349329824342; my $nf = new Number::Format(-thousands_sep => ','); my $separated_num = $nf->format_number($num);
  • Comment on Re: Answer: How do I print a large integer with thousands separators?
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2022-05-17 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (65 votes). Check out past polls.

    Notices?