in reply to Re^3: How do I sort an array by hash value?
in thread How do I sort an array by hash value?
Your approach doesn't seem to sort the array unless I change it from@id = sort { $lid->{split(/=/, $a)} cmp $lid->{split(/=/, $b)} } @id;
tomy $a_ = $a my $b_ = $b
But if I do that then the values of the array get cut off at the '=' sign (I understand why).$a = $a $b = $b
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How do I sort an array by hash value?
by AnomalousMonk (Archbishop) on Aug 17, 2009 at 22:25 UTC | |
|
Re^5: How do I sort an array by hash value?
by ikegami (Patriarch) on Aug 18, 2009 at 06:52 UTC | |
|
Re^5: How do I sort an array by hash value?
by vitoco (Hermit) on Aug 18, 2009 at 03:31 UTC |