[Bioperl-l] perl question

Sendu Bala bix at sendu.me.uk
Mon Nov 5 12:47:17 UTC 2007


neeti somaiya wrote:
> Again a perl question, and maybe a very trivial one.
> How do I terminate a number like 3.1232010098 to only 3 decimal places in
> perl?

Please don't use this list to ask general Perl questions.
See these instead:

http://perldoc.perl.org/perlfaq4.html
http://lists.cpan.org/
http://www.perlmonks.org/


$rounded = sprintf("%.3f", $number);



More information about the Bioperl-l mailing list