Here's a simple (and quite fast) one using substr:
my $number = 132452345; for ( my $i = -3; $i > -1 * length($number); $i -= 4 ) { substr( $number, $i, 0 ) = ','; }
In reply to Re: How do I print a large integer with thousands separators?
by Jaap
in thread How do I print a large integer with thousands separators?
by miblo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |