title: how to check whether an element is present in an array using template toolkit
body: <p>i am trying to find out whether an array contains an element in template toolkit. not sure how? can anyone help?</p>
  
  <pre><code>my $var ={
  myarray =&gt; ['a','c','b','d']
  }
  </code></pre>
  
  <p>passed to tt:</p>
  
  <p>now want to check:</p>
  
  <pre><code>[% IF ( myarray contains 'a') %]
  [% END %]
  
  [% IF ( myarray contains 'e') %]
  [% END %]
  </code></pre>