I'm using the following to sort an array that is composed of a list of decimal numbers:
@Final = sort { $a cmp $b } @Final;
It almost does it right accept it thinks like 9.2 is the same thing as 90.2 or 900.2. Here's a sample of the output:
887.91732
89.58872
890.72645
894.04662
899.18190
9.98097
903.69055
How can I get it to take the decimal places into account?
Thanks,
Lauren
@Final = sort { $a cmp $b } @Final;
It almost does it right accept it thinks like 9.2 is the same thing as 90.2 or 900.2. Here's a sample of the output:
887.91732
89.58872
890.72645
894.04662
899.18190
9.98097
903.69055
How can I get it to take the decimal places into account?
Thanks,
Lauren