That's a good theory, but the spaceship operator $a <=> $b coerces its argument into integers numbers, so this shouldn't matter. Indeed, run your code without the + 0 or simply
and you will see that the output is the same.perl -le'$,="\n"; print sort {$a<=>$b} qw(1e-13 2e-18 1e-11)'
In reply to Re^2: sorting scientific numbers
by kaif
in thread sorting scientific numbers
by smahajan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |