sub length { my ($h, @t) = @_; return 0 unless defined $h; return 1 + length(@t); }