in reply to Need help with legacy HTML::Template code

I'm with b10m on this. After reading the post through several times, I have to make several assumptions for the question to make sense. It would really help to rephrase your problem statement, specifically calling out what you expect (or desire) to happen, and what you are actually observing. "[I]t doesn't work" isn't enough to go on without a statement of what "working" means, and some indication of what you're seeing instead. It would also help to post a code fragment that demonstrates the problem, though if you're in over your head on someone else's code, this may be a challenge.

If you have a construct that looks like

<TMPL_IF NAME="contig"> abc <TMPL_ELSE> xyz </TMPL_IF>
then the ELSE part will be expanded if contig holds a "false" value (i.e., if it holds undef, an empty string, or zero).