in reply to Re^3: Sorting an array of anonymous hashes with named hashes using hash value
in thread Sorting an array of anonymous hashes with named hashes using hash value

Hi nysus,

There is one caveat to the AM's code: because hash ordering is random, ( values %$_ )[0] picks a random value from that hash. So if I change your example data structure like so: $places->[0]{123}{name} = "Alpha";, the sort will give random results. So if you use that sort method, make sure that you know each hash at that level only has one key.

Hope this helps,
-- Hauke D