in reply to HTML::Template and Spaces

Does using quotes for the value help? (I've never used this module so this is just a guess)

VALUE="<TMPL_VAR NAME=TEXT>"

HTML::Template has lots of docs with examples ;)