http://www.perlmonks.org?node_id=1024616


in reply to Re^2: IF in a loop using HTML::Template
in thread IF in a loop using HTML::Template

From the POD ...

Inside a <TMPL_LOOP>, the only variables that are usable are the ones from the <TMPL_LOOP>. The variables in the outer blocks are not visible within a template loop. For the computer-science geeks among you, a <TMPL_LOOP> introduces a new scope much like a perl subroutine call. If you want your variables to be global you can use global_vars option to new() described below.

HTML::Template
-Kiel