title: How can I search a fixed and case insensitive string pattern in an array in Perl?
body: <p>I want to make a perl script to take a list of values (the keys in a hash) and search it in an Array. I need to search the fixed pattern, but it can be case insensitive. This is my code:</p>
  
  <pre><code>foreach my $element ( keys %data ) {
      # this line search the exact pattern, but it isn't case insensitive
      if ( first { $element eq $_ } @database_lines ) {
          $counter += 1;
          print "$element\n";
      } else {
          next;
      }
  }
  </code></pre>
  
  <p>Some ideas? Thanks in advance.</p>