title: Read a file into an array using Perl
body: <p>I am currently reading a file and storing the data in an array named <code>@lines</code>. Then, I loop through this array using a <code>for</code> loop and inside the loop I match on certain values:</p>
  
  <pre><code>$find = "fever";
  
  if ($_ =~ /$find/) {
      print "$_\n";
      $number++;
      #@lines =
      #print ("there are : " . $number);
  }
  </code></pre>
  
  <p>At the moment, I am using a scalar, <code>$find</code>, with a value of <code>fever</code> instead of performing the repetitive statements for each filter.</p>
  
  <p>Can I pass an array for comparison instead of a scalar keyword?</p>