In addition to what's been said, there're also better algorithms (better then linear search, that is). Binary search is what you normally want for fast searches in arrays... (but you need sorted arrays)
List::BinarySearch looks good, or even
Tree::Binary::Search, depending on your needs.