in reply to sorting routines, mapping and code style

Well, you can speed up your sort by using a GRT. Something like the following should do the trick:
@heh = map {s/^(\d+):(.*)/$2: $1/; $_} sort map {sprintf "%10d:$_"} keys %hmm;
But considering the amount of data in %hmm, that's not going to be your bottleneck, so why bother?

Abigail