Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

RE: De-engineer a number

by perlmonkey (Hermit)
on May 25, 2000 at 11:09 UTC ( [id://14716]=note: print w/replies, xml ) Need Help??


in reply to De-engineer a number

Probably overkill. Perl understands the e notation already.
$a = 5.6e3; print $a , "\n"; #or $a = '5.6e3'; $b = eval($a); print "$a == $b\n";
Results:
5600
5.6e3 == 5600

Replies are listed 'Best First'.
RE: RE: De-engineer a number
by KM (Priest) on May 25, 2000 at 17:45 UTC
    Overkill? It is a neat regex, that was the point. The point wasn't to find the best way to do it, but a cool, fun way.

    Cheers,
    KM

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-25 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found