in reply to Refactor my sort

Well, $a and $b are globals... so just put your conditionals into a sub and then omit your parens in the sort-call and it'll work pretty much just like you have it. There are examples of that on the sort page. You'll be amused to see how close you really were.

-Paul

Replies are listed 'Best First'.
Re^2: Refactor my sort
by Herkum (Parson) on Dec 22, 2006 at 16:28 UTC
    Looking at the sort documentation, you are totally on the mark, THANKS! :)