in reply to Quickly finding an element in an array

Note that hashing will only work out as better if you need to find several elements. IIRC the tradeoff is around 7 elements or so, above that and building the hash works, less and you might as well grep.

And if you want to create the hash, the fastest way I know of is:

my %is_there; undef(@is_there{@list});