while( my ( $distrib_type, $href ) = each %{ $distributions } ) { my $regobj = Statistics::LSNoHistory->new( points => [ %{ $href->{distribution} } ] ); print "\nData for $distrib_type:\n"; printf("Slope: %.2f\n", $regobj->slope); printf("Intercept %.2f\n", $regobj->intercept); printf("Correlation Coefficient: %.2f\n", $regobj->pearson_r); printf("Variance (y): %.2f\n", $regobj->variance_y); }