http://qs321.pair.com?node_id=750174


in reply to regex search fails

Try print if /\Q$pattern/. Since your pattern contains the literal string '$testVar', using the \Q escape will prevent it from being interpolated in the match.