You can embed perl code in your templates, escaped in the way you choose.
In reply to Re: Intermixed perl? by jbert in thread Intermixed perl? by bschmer