You need to remove 'Drive' from the comparison so that perl can make a number from it. sub mysort { substr($a,5) <=> substr($b,5) } That could probably benefit fram a Schwartzian Transform.
After Compline,
Zaxo
In reply to Re: "numeric" sort of keys?
by Zaxo
in thread "numeric" sort of keys?
by Gorio3721
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |