in reply to RE: Re: better way to find list members?
in thread better way to find list members?

If all you want is existence, then this:
@animals{@animals}=undef; print "Got a dog!\n" if exists $animals{dog};
is faster and uses less memory.