Alright. The ordering you're getting now is alphabetical, as a result of sort keys %data.
I can't see an ordering in the series "x", "y", "a", "z". The only way I can see to do that is to define it explicitly, something like this: foreach my $key (qw(typex typey typea typez))
If there is an order to that series that I'm not seeing, you may be able to capture the logic in a custom sort function. Look up the sort docs for more info.
HTH
In reply to Re (3): Working with arrays
by VSarkiss
in thread Working with arrays
by kevinw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |