> Is this correct? > > if ($string1 =~ /\*\s*\$string2|\$string2/) ^^ ^^ Looks like you're escaping the variable, you're searching for a literal dollar sign rather than the value of $string2. // jt