I have a string that I want to check for the presence of another string. The only problem is, both strings are stored in variables. How can I do this? I'm assuming I can't just say
if ($string1 =~ /$string2/)
because this will search for the actual string "$string2".
Thanks in advance.