in reply to Catalyst & Pretty Data

Did you look at Number::Format yet? It has been implemented as a plugin / filter for Template Toolkit: Template::Plugin::Number::Format

From the docs:

Template::Plugin::Number::Format makes the number-munging grooviness of Number::Format available to your templates. It is used like a plugin, but installs filters into the current context.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James