in reply to Re: sort file with your own logic
in thread sort file with your own logic
How will that sort "4321K" vs "2M"? Sorting by normalized value would be my preference.
sub val { m/([\d.]*)([BKMGTEPZY]?)/ and $1 * $scale{$2} } ... sort { val($a) <=> val($b) } ...
|
|---|