http://qs321.pair.com?node_id=117705


in reply to How do I print a large integer with thousands separators?

FAQ! Take a look at perlfaq5. It references Number::Format, and also shows code for a regex and a subroutine, if you'd rather not use the module.