in reply to Efficient way to verify scalar contents
Just for some TMTOWTDI fun :)
sub validate { local $_ = shift; length >= 20 ? 1 : !/[a-z]/ || !/[A-Z]/ ? 0 : length >= 16 ? 1 : !/\d/ ? 0 : length >= 12 ? 1 : !/[^_\w]/ ? 0 : length >= 8 ? 1 : 0; }
Besides, I think it's cute.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Efficient way to verify scalar contents
by haukex (Archbishop) on Jun 24, 2020 at 09:46 UTC | |
by tybalt89 (Monsignor) on Jun 24, 2020 at 15:13 UTC | |
by haukex (Archbishop) on Jun 25, 2020 at 06:36 UTC |
In Section
Seekers of Perl Wisdom