in reply to Remove duplicate strings from an array

This is a FAQ:

perldoc -q duplicate

How can I remove duplicate elements from a list or array?

Your error likely stems from the fact that you're trying to use == as comparison operator, but == is the operator used to check for numeric comparison. If you want to compare two strings for equality as strings, use the eq operator. But it's better to use the method outlined in the FAQ.