I put together a little templating processor yesterday. It uses HTML::TokeParser (once again, thanks CPAN!) to do the dirty work. Currently, it supports in-line scripting, includes and if/else testing. The syntax is XML-oriented and even uses a namespace so it can coexist in XHTML files easily. I like it.
It didn't take very long to write-- the main function is about 75 lines long.
I love Perl.