Use $newline in your comparison.
In reply to Re: check whether a array element is equal to a string. by PeterPeiGuo in thread check whether a array element is equal to a string. by ritchie