I haven't used Perl for this but have thought at length about the same problem domain. I'd be looking into
Perl Data Language for dealing with numerically intensive tasks... (though it seems to be down at the moment)
When it comes to regression,
Statistics::Regression might be what you're after.