in reply to give arguments to sort_sub

Sounds like something Sort::Fields knows how to do. Steal the code from there.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.