in reply to String Comparison Issue
It seems that the strings in @searchTerms still have trailing newline characters, so if you search for them, you'll only find them at the end of the line.
chomp can help you here.