title: Grep to find item in Perl array
body: <p>Every time I input something the code always tells me that it exists. But I know some of the inputs do not exist. What is wrong?</p>
  
  <pre><code>#!/usr/bin/perl
  
  @array = &lt;&gt;;
  print "Enter the word you what to match\n";
  chomp($match = &lt;STDIN&gt;);
  
  if (grep($match, @array)) {
      print "found it\n";
  }
  </code></pre>