If you don't need anything so heavyweight as the Template Toolkit, you might give a look at CGI::FastTemplate. Don't let CGI in the name fool you: It doesn't actually have anything to do with CGI at all. It's fairly lightweight, easy enough to learn, and relatively fast, too.