Perhaps sort grep defined, ($val1, $val2)?
In reply to Re: sort and undef by Fletch in thread sort and undef by jeanluca