in reply to Template::Toolkit - uc() and lc(), other simple formatting mutators - see TT Filters!

If you don't find a filter that does what you want, just make your own sub ref and pass it to the template.
my $ucfirst = sub { ucfirst($_[0]) }; $template->process($template_name, { %vars, ucfirst => \&ucfirst });
And then in your template...
[% ucfirst(foo) %]
  • Comment on Re: Template::Toolkit - uc() and lc(), other simple formatting mutators - see TT Filters!
  • Select or Download Code