Created
September 10, 2012 02:57
-
-
Save kimmel/3688579 to your computer and use it in GitHub Desktop.
brute force all match patterns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use v5.14; | |
use warnings; | |
use utf8::all; | |
use File::Slurp qw( read_file ); | |
... | |
my @patterns = map {qr/\b$_\b/ixms} keys $pattern_list; | |
my $content = read_file( $fname ); | |
foreach my $term (@patterns) { | |
if ( $content =~ $term ) { | |
# post processing | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment