in reply to sort and undef

Perhaps sort grep defined, ($val1, $val2)?