in reply to Binary search algorithm

I know you did this as a learning exercise, but there is already a module Search::Binary that does this.