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