use HTML Templates which allows expressions
perl module that provides an extension to HTML::Template which allows expressions in the template syntax. This is purely an addition - all the normal HTML::Template options, syntax and behaviors will still work.
Homepage: https://sourceforge.net/projects/html-template/