in reply to module for cluster analysis

Have you even checked CPAN? The module that I used for Standard Deviation is Math::NumberCruncher. Although I am sure there are more modules than that, it has worked for me.