AFAIK perl will handle up to 15 (14 to be exact) precision without any 
helpers like Math::BigFloat. Then you just use sprintf ('%.Xf', $var) where 
X is the precision you want. Keep in mind that standard rounding is enforced 
(.4 - .5 as breakpoint)

Peter


> Hello,
> 
> My goal is to divide two whole numbers and get the results to a given 
> number of decimals.
> 
> $ perl -e 'print 2/3,"\n";'
> 0.666666666666667
> $
> 
> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> use Math::BigFloat;
> use Data::Dumper;
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to