A hash has no order.
But maybe you want to output the elements of a hash in a particular order. Then you can use the following approach with a "hash slice" for example:
my @columns= qw(A R N D C Q E G H I L K M F P S T W Y V B Z X); my %hash= ...; print "@columns\n"; print "@hash{ @columns }\n";
The alternative approach is to simply use a loop over @columns.
In reply to Re: sorting hash in a non alpabellical order
by Corion
in thread sorting hash in a non alpabellical order
by madM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |