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


in reply to Golf: Tree searching

Hmmm...
sub z{my($s,$t)=@_;return if!$t;(z($s,$t->{r},$t,z($s,$t->{l}))[$s cmp + $t->{d}]}
81 chars. Shorter than Masem, but longer than jcwren. However, something's wrong with it that I can't quite pinpoint. Can anyone figure out why this doesn't work?