new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_regex / examples / validate.pl
index 3a925c6..4bd6791 100755 (executable)
@@ -3,8 +3,7 @@
 use strict;
 use warnings;
 
-if(@ARGV < 2)
-{
+if (@ARGV < 2) {
     die "$0 file error_msg\n";
 }
 
@@ -12,26 +11,20 @@ my ($prog, $file,$msg) = (@ARGV);
 
 open(FILE,$file) || die "Error opening file: $file\n";
 
-if(! -f $prog)
-{
-        die "File $prog not present\n";
+if (! -f $prog) {
+    die "File $prog not present\n";
 }
 
-while(<FILE>)
-{
+while(<FILE>) {
     my $line = $_;
     print "running: $prog $line\n";
     my $result =  `$prog $line`;
-    if($result =~ /$msg/)
-    {
+    if ($result =~ /$msg/) {
         print $result;
         print "\t ** $line **\n";
         <STDIN>;
-    }
-    else
-    {
+    } else {
         print $result;
     }
 }
 
-# EOF