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) } ...
In reply to Re^2: sort file with your own logic
by Anonymous Monk
in thread sort file with your own logic
by citi2015
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |