#!/usr/bin/perl use strict; use warnings; my @myTerms = ( 'foo bar', 'blah' ); my $term = "foo"; if ( grep /\Q$term\E/, @myTerms) { # the line that i'm having trouble with - $match always = null. my ($match) = ( grep $term =~ /\Q$_\E/, @myTerms ); print "$term does match with $match\n"; } # end-if exit;