Greetings all,
I can't remember now where I found this but it was from someone here... very helpful.
Thanks whoever it was.
I Hope this helps.
sub add_commas {
my $text = reverse $_[0];
$text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
return scalar reverse $text;
}
-injunjoel
Update:It's
tachyon's code!
Thanks
tachyon!
Always give credit where credit is due. (original post:
352970)