if ($item eq "SELECT") { $tmpl = "select.tmpl"; } elsif ($item eq "CONTINUE") { $tmpl = "continue.tmpl"; } elsif ($item eq "DENIED"){ $tmpl = "denied.tmpl"; }
In which case (I know you're adapting the OP's code, but) one would probably use a hash instead, especially if other options were possibly to be added. But of course this is just a complete side note.
In reply to Re^2: HTML::Template : How to separate code and html with lesser maintenance issues
by blazar
in thread HTML::Template : How to separate code and html with lesser maintenance issues
by sara2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |