adumitrescu
Programmer
Hello,
The items in my array all looks like "nnn/xxx" where nnn is a number with 1 to 5 digits, and xxx is a string. I wish to sort this array numerically. Using sort {$a <=> $b} %array does sort as desired, but outputs a TON of warnings about my argument not being numeric. I don't want to just hide the warnings - I would rather tune my sort comparison to be more intelligent (only compare the piece up to but not including the slash.
Thanks.
The items in my array all looks like "nnn/xxx" where nnn is a number with 1 to 5 digits, and xxx is a string. I wish to sort this array numerically. Using sort {$a <=> $b} %array does sort as desired, but outputs a TON of warnings about my argument not being numeric. I don't want to just hide the warnings - I would rather tune my sort comparison to be more intelligent (only compare the piece up to but not including the slash.
Thanks.