http://www.perlmonks.org?node_id=73936


in reply to Golf: Tree searching

sub f{my($s,$t)=@_;$t?$$t{d}eq$s?$t:f($s,$$t{l})||f($s,$$t{r}):0}
61 chars. Passes -w and use strict.

Hint: You don't have to take advantage of the binary search property...