You can use the TextExists function within your Perl Script.
The format and information is as follows for Perl ...
Searches for "TextToLookFor" in the answer of QuestionName. If found, a 1 is returned; if not found, a 0 is returned.
Example using your question names and variables:
Also, in your example above, you would not use "==" in your conditional script as the operator when using text, you would do something like this ...
if(GETVALUE("QName") eq "Sally")
One final comment. Some respondents tend to type in script with typos, so you may want to consider that when writing your Perl Script.