Hello fellow Monks, So I'm working on a program this week, and I'm having some trouble with sorting... I have a hash, and I want to transfer the keys to this hash to an array called "labels". I want to transfer the values of the hash to an array called "content". This works fine. My problem is that nothing is ordered. The labels consist of "title 1", "title 2" etc The array references should match one other. So for instance... $labels[0] and $content[0] should correspond to one another but they don't because the hash keys and values are going into the array elements in a random order every time I run my code. I tried using something like "@labels = sort keys %hash" but this doesn't work. Suggestions or insight are much appreciated. -DARK SCIENTIST
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |