Super Simple, I suppose ...
The piece of code beneath outputs the keys and values of the hash ... How do I sort this hash so that Number will be printed first ?
my %hash = ( EX => 'ArraySite', AM => 'IOPort', PLE => 'AddressGroup', Number => '11', ); for my $key ( keys %hash ) { my $value = $hash{$key}; print "$key => $value\n"; }
In reply to Hash Order by Sporti69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |