in reply to RegEx Comparison

Am I missing anything in the comparison?
quotemeta
if ($var1 =~ /\Q$var2/)

Please use code tags: Writeup Formatting Tips