in reply to Binary vs. linear search

And just as a data point, if you need more speed then look at List::BinarySearch. Recent versions of List::MoreUtils also support binary searching: https://metacpan.org/pod/List::MoreUtils#bsearch-BLOCK-LIST.