http://qs321.pair.com?node_id=374690

joule has asked for the wisdom of the Perl Monks concerning the following question:

I have a hash, %hash, with the following keys, in the following order:

$hash{'John'}
$hash{'Bob'}
$hash{'xavier'}
$hash{'alice'}

I would like to sort these keys according to the 'case-ness' of the first letter of the keys, such that the hash is re-sorted like the following:

$hash{'alice'}
$hash{'xavier'}
$hash{'Bob'}
$hash{'John'}

I've tried using various sort techniques mentioned in perldoc perlfunc, but none have worked.

Any suggestions?

Thanks for the help.