Right you are. I do not like warnings I do not understand, so after reading up on smartmatch (which I thought was the problem) and searching on the error message, I decided to post here to see if someone could figure out the problem. And I took the advice and fixed the return codes for my_sort and replaced smartmatch with greps, and have a working custom sort routine now. I also didn't know smartmatch was moved into experimental status, which was an added bonus. Thanks again to everyone!!