Maybe my question is really easy, but I would like to know the best way and efficient one.
Let's we have an array of strings and we want to compare it with another string. say,
my @array = {"hi","bye","you","shadow", "hi"}
Now I want to check if at least one element of the array equals hi
then there is some condition.
May I know your idea about it. I know that within a for
loop one could do it easily, but Would you would suggest as a good one?