common/tools/brag/logToBRAG.pl
changeset 576 7be9799d1a41
parent 572 974b8ee5b70e
child 578 75fa4158340a
equal deleted inserted replaced
575:588d89ee2c05 576:7be9799d1a41
    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}])