Converting Numeric String into Perl's Processable Number

Posted by neversaint on Stack Overflow See other posts from Stack Overflow or by neversaint
Published on 2010-04-15T01:22:58Z Indexed on 2010/04/15 1:43 UTC
Read the original article Hit count: 466

Filed under:
|
|
|

I have a file that contain list of numbers that looks like this:

10^-92
2 10^-14
10^-105
3 10^-20

To explain a bit further 10^-92 is essentially 1E-92 and 2 10^-14 is 2E^-14. Is there a compact way to convert the number in above file into Perl number? At the end I want to sort these number numerically.

© Stack Overflow or respective owner

Related posts about perl

Related posts about linux