The $& in the string (last parameter) is evaluated at the time of the call to
like, whereas the regex comparison is performed within the method, so using the local variables in the way you have described is doomed to failure.
Looking at the code, the name parameter is passed through a couple of methods to Test::Builder::_regex_ok, so I don't think you can escape the string up a few levels either.
If any of my proposed solutions have minor errors, it's because I don't waste my genius on trivial matters. :-P