http://www.perlmonks.org?node_id=325534


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