Hi Friends,
I've an exponent value like,
$val="9.57669e-05";
I want to convert this value to floating point value in PERL scripting. I tried googling for the solution, and also asked many perl friends. Unfortunately, I didn't get answer.
Could you please help me?
Thanks in advance / Mysore Ganapati.
$ $ perl -e '$val="9.57669e-05"; printf("%.10f\n", $val)' 0.0000957669 $
tyler_durden
You mean like this:
perl -le '$val="9.57669e-05"; printf "%.15f\n",$val'; 0.000095766900000
Exactly worked as I wanted.
Thanks a lot, Pludi.
Hi.
The command
perldoc -f sprintf
produces:
which describes the conversion / formatting / conventions ... cheers, drl