in reply to regex to return matched value from array
my @myTerms = ( 'foo bar', 'blah' ); my $term = "foo"; for ( @myTerms ) { print "$term match with $_\n" if /\Q$term\E/; } [download]