in reply to Template Toolkit output to a scalar?
According to the Template docs, the third param to process can be a SCALAR ref - just pass in a ref to the variable you want to receive it.