It appears that: (in obo ontology test) my @terms = $ont->get_child_terms($roots[0]); @terms array order is not always the same. As following tests take first element of array, it explains why sometimes it succeed, sometimes it fails Now I don't know why order is different