in reply to Re^2: How do I sort an array by hash value?
in thread How do I sort an array by hash value?
@id = sort { ( my $a_ = $a ) =~ s/=.*//s; ( my $b_ = $b ) =~ s/=.*//s; $lid->{$a_} cmp $lid->{$b_} } @id;
Update: Oops, added missing underscores as per Re^5: How do I sort an array by hash value?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How do I sort an array by hash value?
by josh097 (Initiate) on Aug 17, 2009 at 22:02 UTC | |
by AnomalousMonk (Archbishop) on Aug 17, 2009 at 22:25 UTC | |
by ikegami (Patriarch) on Aug 18, 2009 at 06:52 UTC | |
by vitoco (Hermit) on Aug 18, 2009 at 03:31 UTC |