in reply to Default Dropdown Value
return $inverted{ $values_asc[0] } # default key
Part of the readability problem is that reverse stands for two different functions including an idiomatic trick to invert hashes.
Highlighting that hash inversion was meant can't be wrong...
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Talking about performance, the first line is superfluous copying you could already reverse the arguments. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Default Dropdown Value
by choroba (Cardinal) on Oct 17, 2014 at 10:00 UTC | |
by LanX (Saint) on Oct 17, 2014 at 10:05 UTC |