OP knows the comparisons are working because of the debug-statements; the code is not Perl, but TemplateToolkit2 - and there was no eq in TT2 the last time I took a look (take a look for yourself)
regards,
tomte
An intellectual is someone whose mind watches itself. -- Albert Camus