in reply to Re: splitting array values
in thread splitting array values
It looks like your making one long string in $rank, the equivalent of:$rank .= " " . $key; I'm guessing that your array has one element with one long string in it, so it looks like it's not sorted.
If you just want to get a sorted list of the keys, you can do:
Notice you don't have to do a reverse, you can just change the sense of the comparison.@sorted = sort { $b <=> $a } keys %rank;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (2): splitting array values
by mkurtis (Scribe) on May 20, 2004 at 04:05 UTC |