in reply to Hash sorting (by value) woes

This is a good situation for using a Schwartzian Transform. The code you have is close to right, but it's confusing and hard to follow a bit, partly because of all that logic in the sort block that isn't really part of the sorting. I'd move the regex matching out to a preliminary map, put just the sorting code in the sort block, and then map back to the part you want in the upper map...

my @sortedkeys = map { $$_[0] } sort { $$a[1] <=> $$b[1] } map { $$etcpw{$_} =~ /[:](\d+)/; [$_, $1] } keys %$etcpw;

Much easier to follow, if you ask me. As far as why your original code doesn't work, I think it's because pattern matches don't do the same thing in scalar context as they do in array context.


"In adjectives, with the addition of inflectional endings, a changeable long vowel (Qamets or Tsere) in an open, propretonic syllable will reduce to Vocal Shewa. This type of change occurs when the open, pretonic syllable of the masculine singular adjective becomes propretonic with the addition of inflectional endings."  — Pratico & Van Pelt, BBHG, p68