open SMALL, '; close SMALL or warn "Couldn't close smallfile; $!\n"; #### open BIG, ' ) { s/^\d{2}:\d{2}(.*)$/$1/; $match=0 and next unless $_ eq @find[match++]; next unless $match == scalar @find; # If you got this far, you've matched all the lines in the smallfile # as contigeous lines in the bigfile. So do something... # If you need to know where the sequence of matching lines started (in the bigfile) # $. = scalar @find will tell you. $matched = 1; } close BIG or warn "Couldn't close bigfile; $!"; print "Didn't find the contents of smallfile in bigfile\n" unless $matched; #### my @excluded = qw( a did encountered process ); # tailor as appropriate for my $line (@lines) { local $"= '.*?'; #" # break the line into an array of words minus exclusions my @words = grep{ !(1+index($excluded,$_)); } $line =~ m/\b\w+\b/g # replace each line with a fuzzy matching compiled regex $line = qr"@word"o; } #### $match=0 and next unless $_ eq @find[match++]; #### $match=0 and next unless $_ =~ @find[match++]; #### (?i-xsm:abc.*?problem) (?i-xsm:abc.*?restart) #### for my $line (@lines) { # break the line into an array of words minus exclusions my @words = grep{ !(1+index($excluded,$_)); } $line =~ m/\b\w+\b/g # Word breaks to avoid partial word matches local $local $"='\b|\b'; #" # replace each line with a multi-matching compiled regex $line = qr"\b@a\b"oi; } #### my $n = () = $_ =~ m/@find[match++]/g; $match=0 and next unless $n > $than_some_predetermined_ number;