in reply to Checking how safe a given password is.

By coincidence one of the newest modules on CPAN is Crypt::Cracklib, an interface to cracklib which is a well-known C library that does exactly what you want.

That said, I have not used this module, and it looks early alpha.

I am more tired than I thought. I horribly misread the timestamp. This module has been around for ages. Still no idea how well it works.