in reply to Variable in pattern matching line

Anyway I can put the the data matching in a variable??
You can use the qr// construct to build regular expression objects e.g
my $re = qr/(?:match|matching\.com|match.company)/i; print "regexp - $re"; __output__ regexp - (?i-xsm:(?:match|matching\.com|match.company))
You might also want to consider Regex::PreSuf. Another thing to note is that due to the nature of alternation in perl's regex engine anything with 'match' will always match (regardless of the 'ing.com' or '.company'), making the other two alternations redundant. So you'll want to reverse the order of the alternation groups e.g
my $re = qr/(match|matching\.com|match.company)/i; print "old - $1\n" if "matching.com" =~ $re; $re = qr/(matching\.com|match.company|match)/i; print "new - $1\n" if "matching.com" =~ $re; __output__ old - match new - matching.com
See. perlre for more info on regexes in perl.
HTH

_________
broquaint