in reply to Sorting by association, a tail of dependency resolving gone nowhere
Dunno if this helps (a bit late) but my take would be something like:
my %dmap = ( 1 => undef, 2 => 4, 3 => 5, 4 => 3, 5 => 1, ); my $key = 0; defined $dmap{$_} or $dmap{$_} = $key for keys %dmap; my %pamd = reverse %dmap; print $key = $pamd{$key} while $pamd{$key};
|
|---|