in reply to adding comma's... formatting numbers

The following code will comma-fy floating numbers, like 10000.00 into 10,000.00. Which I think would be more useful to you than one that formats just integers.

{ local $_ = $amount; /\./ ? s/(?<=\d)(?=(\d{3})+(?:\.))/,/g : s/(?<=\d)(?=(\d{3})+(?!\d))/,/g; $amount = $_; }