I have a hash the structure is like :

```
my %my_hash=(
 'gee1' =>  {
                   'gene' => '20',
                   'mRNA' => '9',
                   'CDS' => '10',
                    'exon' => '10',
                    'product' => '10',
               },
'gee2'   =>  {
                     'gene' => 'aa',
                   'mRNA' => '9',
                   'CDS' => '1aa',
                    'exon' => '1aa',
                    'product' => 'ab',

               },
'gee4'   =>  {
                     'gene' => 'aa',
                   'rRNA' => '9',
                    'product' => 'ab',
                    'locus' => 'abc'

               },
'gee11'   =>  {
                     'gene' => 'aa',
                   'rRNA' => '9',
                    'product' => 'ab',
                    'locus' => 'abc'

               });

```

when I am trying to print the hash in the above order, using the bellow code :

```
for my $id ( sort { my ($anum) = ($a =~ /\w(\d+)$/);  my ($bnum) = ($b =~ /\w(\d+)$/);  $anum <=> $bnum} keys %my_hash)
{
    print "$id\n";
    for my $id1 (keys %{$my_hash{$id}})
    {
            print "\t$id1\n";
    }
}

```

the out put is like this : 

```
gee1
    product
    exon
    gene
    mRNA
    CDS
gee2
    product
    exon
    CDS
    mRNA
    gene
gee4
    product
    locus
    gene
    rRNA
gee11
    rRNA
    gene
    product
    locus

```

you can see that 

```
product
exon
gene
mRNA
CDS

```

the above part is not in ordered.  

is their any way to sort the above part?

order is like:
 **gene,mRNA,rRNA,CDS,exon,product,locus**