in reply to sort by hash with existence check

Here's an alternative, using the Guttman Rosler Transform.
@sorted_keys = map { (split /\0/)[2] } sort map { sprintf "%s\0%03d\0%s", split(/\W+/), $_ } keys %$hash;

jdporter
...porque es dificil estar guapo y blanco.