in reply to RE: simple!!
in thread simple!!
s/([\.\d]+)e\(?([-+]?\d+)\)?/$1*10**$2/egi;
my $foo = 1.2234e(+2);
Perl will complain. If you do the following, it won't:
my $foo = 1.2234e+2;
The above RE should handle both cases. This is fun though..
$_=sprintf("%#1.4e",122.34); print; s/([\.\d]+)e\(?([-+]?\d+)\)?/$1*10**$2/egi; print $/; print;
Cheers,
KM
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: simple!!
by t0mas (Priest) on Aug 19, 2000 at 22:26 UTC |