I see a few problems anyway:
- To check the length, there is a length function. No need to split it into an array.
- The \d and \w match more than you might think! As noted in perlrecharclass, "unless the /a modifier is in effect \d not only matches the digits '0' - '9', but also Arabic, Devanagari, and digits from other languages. This may cause some confusion, and some security issues".
- I doubt the order of type of characters matters, so you wouldn't want word characters followed digits, etc., but any of them in any order, so you'd use (as mentioned in other comments) a character class.