equal
deleted
inserted
replaced
86 die "Rules file not formatted as expected at line $.\n" unless scalar @terms == 2; |
86 die "Rules file not formatted as expected at line $.\n" unless scalar @terms == 2; |
87 push @rules, { regexp => $terms[0], severity => $terms[1] }; |
87 push @rules, { regexp => $terms[0], severity => $terms[1] }; |
88 } |
88 } |
89 |
89 |
90 # Iterate through all the lines of all the files in @ARGV |
90 # Iterate through all the lines of all the files in @ARGV |
91 foreach my $line (<>) |
91 while (my $line = <>) |
92 { |
92 { |
93 chomp $line; |
93 chomp $line; |
94 foreach my $rule (@rules) |
94 foreach my $rule (@rules) |
95 { |
95 { |
96 if ($line =~ m[$rule->{regexp}]) |
96 if ($line =~ m[$rule->{regexp}]) |