sub commify { local($_) = shift; 1 while s/^(-?\d+)(\d{3})/$1,$2/; return $_; }
Cheers,
KM
In reply to RE: regexp for adding commas to a number
by KM
in thread regexp for adding commas to a number
by Kozz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |