in reply to sort != sort

Another thing to consider is that you may have gotten some odd invisible characters typed in there. Try turning on the "view all characters" option in your editor and/or retype the section fresh.

Now, this has been asked elsewhere in the thread, but not yet clearly provided as far as I can see, so:

What minimalistic block of code do we need to run to reproduce your problem?

Cut out the database, cut out everything except:

  1. use strict; use warnings;
  2. An array declaration and assignment with canned data (as few as three elements if that is sufficient to demonstrate the issue)
  3. the sort operation
  4. a print of the results to compare against (1)
Be sure to copy and paste to ensure that the exact same code is on both sides of the internet. It should be only about 6 lines of code, with extra vertical whitespace for readability and Data::Dumper for results.