in reply to The fastest way of searching a certain element in an array

Whats more pertinent in perl I think is the code to find the _index_ of the first matching element in the array. A straight forward existance test is too easily outperformed by a hash. and its unusual in my experience that if you need to this more than once that pre-constructing the hash isnt possible. BTW, id be interested to see if you come up with the fastest technique. Suprisingly it is actually one of the longer solutions.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi