Nope, I just can't do it. I tried to read your mind to determine what your input data looks like and to see how the sort was different than you want, but I just can't do it. Maybe you are too far away, or asleep, or just don't broadcast very well, but I failed. Sorry.
I suggest though that you take a hard look at your use of $tags in your foreach loop. Assigning to the loop variable seems wrong to me. There are of course times when that is the thing to do, but your code doesn't make it clear that changing the content of the loop variable is the intended behaviour as you use the same hash lookup ($tag{$tags}) in two places having changed $tags between times. If that is what you want I'd create a new variable to make it clear that that is the intent.
In reply to Re: Sorting issue
by GrandFather
in thread Sorting issue
by bluray
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |