$txt =~ m/$regex/ and $txt =~ $regex are in fact equivalent. They apply the regex stored in $regex in exactly the same way.
With the first snippet, you do not need to worry about the delimiter appearing in $regex, because the trailing delimiter is found before $regex is interpolated.
If you really want to use delimiters around the regex in the config file, you can, but you'll want to remove them before applying the regex. Here's an example.
my $regex = <DATA>;
chomp($regex);
$regex =~ s,^/,,;
$regex =~ s,/$,,;
my $txt = "The target string.";
if ($txt =~ m/$regex/) {
print "Yes.\n";
}
if ($txt =~ $regex) {
print "Yes.\n";
}
__DATA__
/\bt\w+t\b/
|