in reply to Formatting numbers with commas
sprintf() won't do it, but you may want to take a look at perldoc perllocale to get part of the way there.