On Stackoverflow, there’s the question How can I convert a number to its multiple form in Perl?. The best answer for the particular problem is Number::Bytes::Human. Beyond, that, many of the answers take the usual if-elsif-else
, such as the one suggested by Michael Cramer: Continue reading “Eliminate needless loops and branching”