in reply to correlation

This isn't a Perl solution, but the R Project for Statistical Computing provides a free, open source statistical package which is great for this sort of thing.