in reply to Numbers with commas

tachyon gave a good soltution. Good for if you're getting the data from someplace else. If it's just for your own sake of readibility you can use underscores (_) instead of commas.
#!/usr/bin/perl use warnings; use strict; my $num = 1_002_345; my $total = $num + 1000;
And tachyon commify will work, but the one provided in the Perl Cookbook 2.17 is more efficent.
sub commify { my $text = reverse $_[0]; $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g; return scalar reverse $text; }
-Will