in reply to Sorting by association, a tail of dependency resolving gone nowhere
Update: Corrected typos (thanks Roy Johnson and Ikegami)my %dmap = ( 1 => 0 2 => 4 3 => 5 4 => 3 5 => 1 ); my @tosort = (1,2,3,4,5); my @sorted = sort { $dmap{$a} <=> $dmap{$b} } @tosort;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting by association, a tail of dependency resolving gone nowhere
by artist (Parson) on Dec 13, 2005 at 15:54 UTC |