in reply to Mapping, Sorting, Mapping on hash-keys
The code seems overly complicated however, the following has the same effect:
my %tmp = %$test; delete $tmp{$first}; my @list3 = ([$first, ''], map {[$_, $_]} sort keys %tmp);
Also, the hashref could really just be a plain hash, unless you need to use it elsewhere.
--
John.
|
|---|