- or download this
while (<$file_handle>) {
my @line_array = split(/,/,$_);
push(@filtered_result,$_) if $line_array[70] =~ /192\.168\.200\.|1
+0\.10\.200/; #THIS ISN'T EXACTLY WHAT I WAS DOING SINCE I USUALLY HAD
+ MULTIPLE VALUES TO CHECK
}
- or download this
my $grep_filters = [
{
...
push(@return_array,$return) unless not defined $return;
}
}
- or download this
my @filter_string_array = ('192\.168\.200\.|10\.10\.200',',SEVERE,');
...
...
foreach my $filter_string (@local_filter_string_array){
@output = grep {/$filter_string/} @output;
}
- or download this
my $grep_source = '<$FILE>';
my @filter_string_array = ('192\.168\.200\.|10\.10\.200',',SEVERE,');
...
} #string should look like this: grep {/,SEVERE,/} (grep {/192\.168\.2
+00\.|10\.10\.200/} (<$FILE>));
...
my @output = eval $grep_string_expansion;
- or download this
grep {/,SEVERE,/} (grep {/192\.168\.200\.|10\.10\.200/} (<$FILE>));