# slurp the file.... my @lines = <$fh>; # filter the lines.... my @filter1 = grep( /mixed/, @lines); my @filter2 = grep( !/-- --/,@filter1);