sub isListMember { my ($array, $item) = @_; # array ref, item for (@{$array}) { return $TRUE if ($_ eq $item); # the problematic comperison } return $FALSE; }