⭐ 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.
In Section
Seekers of Perl Wisdom