http://qs321.pair.com?node_id=110162


in reply to Re: Re: Separating big numbers with commas
in thread Separating big numbers with commas

Looks fine to me....
#!/usr/bin/perl -wT use strict; my $number='1234567890.01'; # with commas, should be "1,234,567,890.01 +" print "N=$number\n"; $number =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g; print "N=$number\n";
Output
N=1234567890.01 N=1,234,567,890.01
Care to elaborate on which part doesn't work?

-Blake