Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: place floats into array

by keszler (Priest)
on Sep 19, 2013 at 18:21 UTC ( #1054895=note: print w/ replies, xml ) Need Help??


in reply to place floats into array

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2016-06-30 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (392 votes). Check out past polls.