my $test = join('.*?',@$arref); $string =~ $test # this is the first time # I see "=~" used in non-regex context # what's the purpose?