use strict; use DBI; use DBD::ODBC; use Statistics::Distributions; ### A load of code here ### And then: while ( my @columns = $sthZL->fetchrow() ) { print " Row " . $count++ . ":" . join("\t",@columns) . "\n"; my $degrees_of_freedom_in_numerator = 2*($columns[4]-$columns[6]+1); my $degrees_of_freedom_in_denominator = 2*($columns[6]); my $fprob=Statistics::Distributions::fprob($degrees_of_freedom_in_numerator, $degrees_of_freedom_in_denominator, 0.025); my $result = ($columns[3]+(sqrt(($columns[6]/1000)/$columns[4])*($columns[4]/$columns[4]+($columns[5]-$columns[4]+1)*$fprob*$columns[4]-$columns[3]))*100000); print "\n$result\n"; #### Row 1:All All 459 7236 286820 3000 .010327000000000000000000000 Invalid n: 573641.979346