in reply to Re^5: getting ancestors of element
in thread getting ancestors of element
I discovered that $1 is sometimes undefined on lines 381 and 394 when calling ret_ancestors and caused the error. Need to rethink my logic in the For loop on line 349.