in reply to Re^2: Sort never returns data in right order
in thread Sort never returns data in right order

You should have gotten a warning ("Uninitialized used of ...") unless you happened to have a key named b. Always use use strict; use warnings qw( all );!!!