in reply to Equality of strings
== is the operator for numerical comparisons, just as !=. See perlop.
You likely want eq or ne.