|Don't ask to ask, just ask|
Efficient way to verify scalar contentsby x_stream3m (Initiate)
|on Jun 22, 2020 at 04:09 UTC||Need Help??|
x_stream3m has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks, learning Perl for the first time. I am trying to see if there is a more efficient way of going about verifying the contents of a scalar value.
I have a password input. If the password length is between:
- 8 and 11, the password should contain a-zA-Z0-9 and special characters.
- 12 and 15, the password should contain a-zA-Z0-9.
- 16 and 19, the password should contain a-zA-Z
- 20 and above, no criteria
I feel the current implementation is kind of redundant or inefficient? Maybe I am wrong?