use strict; use warnings; my @a = qw( 1.3e-3 3.7e-5 102 46 1e-4 1e-12 ); # force array element evaluation as numeric before sort $_ += 0 for @a; print $_,$/ for sort { $a <=> $b } @a; __END__ 1e-12 3.7e-05 0.0001 0.0013 46 102
In reply to Re: place floats into array
by keszler
in thread place floats into array
by baxy77bax
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |