in reply to "20q" in perl?

It's a glorified binary search. With 20 questions, you get 2**20 possibilities, or about a million.