# untested! my %h = (...); my @k; while (keys %h) { my $k = each %h; push @k, $k; delete $h{$k}; } @k = sort @k; my $ix = 0; while (@k) { $h{shift @k} = $ix++; }
In reply to Re: In-place sort with order assignment
by salva
in thread In-place sort with order assignment
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |