== is the operator for numerical comparisons, just as !=. See perlop.
You likely want eq or ne.
In reply to Re: Equality of strings by Corion in thread Equality of strings by ovedpo15