$tree->Sort( \&sort_func, $asc, $column); # the same routine but without a coderef works differently $tree->Sort(NUMERIC, $asc, $column); # where NUMERIC is a constant, and thus the sorting is done in C to make it faster and avoid the roundtrip to perl.