#!/usr/bin/env perl my $first = 'match'; my $second = 'matching\.com'; my $third = 'match\.company'; my $data = 'matching.com'; my $test = $data =~ /(?:$first|$second|$third)/gi; print $test , "\n"; __END__ 1