Writing your own commify function may well be right up there with writing your own web framework or templating system. Most of us have done it and it probably wasn't worth the effort. Enter CLDR::Number. (I should note here that it's not obvious from the name that this module will commify for you -- that's one of the reasons I'm writing this up.)

Read the full post: http://www.olafalders.com/2015/09/04/stop-writing-your-own-commify-functions/