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