if (/\s\Q$xyz\E$/) { # Code to run }