use List::Util qw[ first ]; my @terms = ( 'foo bar', 'blah' ); my $term = 'foo'; my $match = first{ /\Q$term/ } @terms; print $match; foo bar