in reply to Regexp doubts

How to add commas to the following number "1234567" as "1,234,567"? using regex substitution and split (if possible)
This is a FAQ. From the command line:
perldoc -q comma

which also points you to: How can I output my numbers with commas added?