XP is just a number | |
PerlMonks |
Re: problem with hash keysby marcink (Monk) |
on Jun 17, 2001 at 07:13 UTC ( [id://89127]=note: print w/replies, xml ) | Need Help?? |
Actually, the fact that you get keys from #1 and #2 in correct order is pure coincidence -- a hash does not remember sequence of assignements. If you want to keep that information you'll have to create an array for keeping key order. Another option is to use the sort function -- in your examples you use alphabetical order, so if that is what you want you can use something like this:
-mk
In Section
Seekers of Perl Wisdom
|
|